<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head>


      <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Latex-Suite Reference</title>
   <link rel="stylesheet" href="latex-suite_files/latex-suite.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.61.2"><meta name="description" content="    Latex-Suite attempts to provide a comprehensive set of tools to
    view, edit and compile LaTeX documents in Vim. Together, they
    provide tools starting from macros to speed up editing LaTeX
    documents to functions for forward searching .dvi documents.
    Latex-Suite has been possible because of the contributions of many
    people. Please see latex-suite-credits for a list of
    people who have helped.
    
    Latex-Suite is released under the Vim charityware license. For
    license and conditions of use look at |copyright|. Replace all
    occurences of ``Vim'' with ``Latex-Suite''. The current copyright
    holders of Latex-Suite are Srinath Avadhanula and Mikolaj Machowski.
    
    Homepage: http://vim-latex.sourceforge.net
   "></head><body><div class="article" lang="en"><div class="titlepage"><div><div><h1 class="title"><a id="d0e1"></a>Latex-Suite Reference</h1></div><div><div class="author"><h3 class="author"><span class="firstname">Srinath</span> <span class="surname">Avadhanula</span></h3><div class="affiliation"><div class="address"><p><tt class="email">&lt;<a href="mailto:srinath%20AT%20fastmail%20DOT%20fm">srinath&nbsp;AT&nbsp;fastmail&nbsp;DOT&nbsp;fm</a>&gt;</tt></p></div></div></div></div><div><div class="author"><h3 class="author"><span class="firstname">Mikolaj</span> <span class="surname">Machowski</span></h3><div class="affiliation"><div class="address"><p><tt class="email">&lt;<a href="mailto:mikmach%20AT%20wp%20DOT%20pl">mikmach&nbsp;AT&nbsp;wp&nbsp;DOT&nbsp;pl</a>&gt;</tt></p></div></div></div></div><div><div class="abstract"><p class="title"><b>Abstract</b></p><p>
    Latex-Suite attempts to provide a comprehensive set of tools to
    view, edit and compile LaTeX documents in Vim. Together, they
    provide tools starting from macros to speed up editing LaTeX
    documents to functions for forward searching .dvi documents.
    Latex-Suite has been possible because of the contributions of many
    people. Please see <a href="#latex-suite-credits" title="12 Credits">latex-suite-credits</a> for a list of
    people who have helped.
   </p><p>
    Latex-Suite is released under the Vim charityware license. For
    license and conditions of use look at |copyright|. Replace all
    occurences of ``Vim'' with ``Latex-Suite''. The current copyright
    holders of Latex-Suite are Srinath Avadhanula and Mikolaj Machowski.
   </p><p>
    Homepage: <a href="http://vim-latex.sourceforge.net/" target="_top">http://vim-latex.sourceforge.net</a>
   </p></div></div></div><div></div><hr></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt>1 <a href="#recommended-settings">Installation and recommended Settings</a></dt><dt>2 <a href="#latex-suite-templates">Inserting Templates</a></dt><dt>3 <a href="#latex-macros">Latex-Suite Macros</a></dt><dd><dl><dt>3.1 <a href="#environment-mappings">Environment Mappings</a></dt><dt>3.2 <a href="#latex-command-maps">Command Mappings</a></dt><dt>3.3 <a href="#font-maps">Font Mappings</a></dt><dt>3.4 <a href="#section-mappings">Section Mappings</a></dt><dt>3.5 <a href="#greek-letter-mappings">Greek Letter Mappings</a></dt><dt>3.6 <a href="#auc-tex-mappings">Auc-Tex Key Bindings</a></dt><dt>3.7 <a href="#diacritic-mappings">Diacritics</a></dt><dt>3.8 <a href="#bibtex-bindings">BibTeX Shortcuts</a></dt><dt>3.9 <a href="#smart-keys">Smart Key Mappings</a></dt><dt>3.10 <a href="#altkey-mappings">Alt Key Macros</a></dt><dt>3.11 <a href="#custom-macros-menu">Custom Macros</a></dt><dt>3.12 <a href="#ls-new-macros">Making your own Macros via IMAP()</a></dt></dl></dd><dt>4 <a href="#latex-packages">Package Handling</a></dt><dd><dl><dt>4.1 <a href="#inserting-packages">Inserting package commands</a></dt><dt>4.2 <a href="#package-actions">Actions taken for supported packages</a></dt><dt>4.3 <a href="#automatic-package-detection">Automatic Package detection</a></dt><dt>4.4 <a href="#supporting-packages">Writing supporting for a package</a></dt></dl></dd><dt>5 <a href="#latex-completion">Latex Completion</a></dt><dd><dl><dt>5.1 <a href="#ls-completion-usage">Latex-Suite completion example</a></dt><dt>5.2 <a href="#ls-completion-ref">Latex-Suite \ref completion</a></dt><dt>5.3 <a href="#latex-completion-cite">Latex-Suite \cite completion</a></dt><dt>5.4 <a href="#ls-filename-completion">Latex-Suite filename completion</a></dt><dt>5.5 <a href="#ls-completion-custom">Custom command completion</a></dt></dl></dd><dt>6 <a href="#latex-compiling">LaTeX Compiling</a></dt><dd><dl><dt>6.1 <a href="#compiler-rules">Setting Compilation rules</a></dt><dt>6.2 <a href="#compiler-dependency">Handling dependencies in compilation</a></dt><dt>6.3 <a href="#compiling-multiple">Compiling multiple times</a></dt><dt>6.4 <a href="#compiler-output-customization">Customizing the compiler output</a></dt><dt>6.5 <a href="#part-compiling">Compiling parts of a file</a></dt></dl></dd><dt>7 <a href="#latex-viewing">Latex Viewing and Searching</a></dt><dd><dl><dt>7.1 <a href="#latex-viewing-rules">Setting Viewing rules</a></dt><dt>7.2 <a href="#forward-searching">Forward Searching DVI documents</a></dt><dt>7.3 <a href="#inverse-searching">Inverse Searching</a></dt></dl></dd><dt>8 <a href="#latex-folding">Latex Folding</a></dt><dd><dl><dt>8.1 <a href="#default-folding">Default Folding Scheme in Latex-Suite</a></dt><dt>8.2 <a href="#customizing-what-to-fold">Customizing what to fold</a></dt><dt>8.3 <a href="#editing-folding">Editing the folding.vim file directly</a></dt></dl></dd><dt>9 <a href="#latex-project">Multiple file LaTeX projects</a></dt><dd><dl><dt>9.1 <a href="#latex-project-settings">Latex-Suite project settings</a></dt><dt>9.2 <a href="#latex-master-file">Specifying which file to compile</a></dt></dl></dd><dt>10 <a href="#latex-suite-commands-maps">Latex-Suite Commands and Maps</a></dt><dd><dl><dt>10.1 <a href="#latex-suite-maps">Latex-Suite Maps</a></dt><dt>10.2 <a href="#latex-suite-commands">Latex Suite Commands</a></dt></dl></dd><dt>11 <a href="#customizing-latex-suite">Customizing Latex-Suite</a></dt><dd><dl><dt>11.1 <a href="#ls-general-purpose-settings">General Settings</a></dt><dt>11.2 <a href="#customizing-place-holders">Place-Holder Customization</a></dt><dt>11.3 <a href="#customizing-macros">Macro Customization</a></dt><dt>11.4 <a href="#customizing-smart-keys">Smart Key Customization</a></dt><dt>11.5 <a href="#customizing-latex-completion">Latex Completion Customization</a></dt><dt>11.6 <a href="#customizing-compiling">Compiler Customization</a></dt><dt>11.7 <a href="#customizing-viewing">Viewer Customization</a></dt><dt>11.8 <a href="#customizing-menus">Menu Customization</a></dt><dt>11.9 <a href="#customizing-folding">Folding Customization</a></dt><dt>11.10 <a href="#customizing-packages">Package Handling Customization</a></dt></dl></dd><dt>12 <a href="#latex-suite-credits">Credits</a></dt></dl></div><div class="section" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both;"><a id="recommended-settings"></a>1 Installation and recommended Settings</h2></div></div><div></div></div><p>
   If you are reading this, it most probably means that you have already
   installed Latex-Suite and the help files. If this is not the case, follow the
   detailed instructions on <a href="http://vim-latex.sourceforge.net/index.php?subject=download" target="_top">Latex-Suite's
    download page</a>.
  </p><p>
   Make sure that you create a few necessary settings in your
   <tt class="literal">~/.vimrc.</tt>
   </p><pre class="programlisting">" REQUIRED. This makes vim invoke Latex-Suite when you open a tex file.
filetype plugin on

" IMPORTANT: win32 users will need to have 'shellslash' set so that latex
" can be called correctly.
set shellslash

" IMPORTANT: grep will sometimes skip displaying the file name if you
" search in a singe file. This will confuse Latex-Suite. Set your grep
" program to alway generate a file-name.
set grepprg=grep\ -nH\ $*

" OPTIONAL: This enables automatic indentation as you type.
filetype indent on
</pre><p>
  </p><p>
   In addition, the following settings could go in your ~/.vim/ftplugin/tex.vim
   file:
   </p><pre class="programlisting">" this is mostly a matter of taste. but LaTeX looks good with just a bit
" of indentation.
set sw=2
" TIP: if you write your \label's as \label{fig:something}, then if you
" type in \ref{fig: and press &lt;C-n&gt; you will automatically cycle through
" all the figure labels. Very useful!
set iskeyword+=:
</pre><p>
  </p></div><div class="section" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both;"><a id="latex-suite-templates"></a>2 Inserting Templates</h2></div></div><div></div></div><p>
   This functionality is available via the <tt class="literal">TeX-Suite &gt;
    Templates</tt> menu.
   This module provides a way to insert custom templates at the beginning of the
   current file.
  </p><p>
   When Latex-Suite first starts up, it scans the
   <tt class="literal">$VIM/ftplugin/latex-suite/templates/</tt>
   directory and creates menu items based on the files found there. When
   you select a template from this menu, the file will be read in above
   the first line of the current file.
  </p><p>
   A template file can utlilize placeholders for initializing the cursor
   position when the template is read in and subsequent movement. In
   addition, template files can contain dynamic elements such as the
   time of creation of a file etc, by using vim expressions.
  </p><p>
   You can place your own templates in the
   <tt class="literal">$VIM/ftplugin/latex-suite/templates/</tt> directory in
   order for them to be available via the menu. Unless Latex-Suite releases a
   template with the same name, these files should not get over-written
   when you install a new release over an existing one.
  </p><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>
    Templates are also accessible for non-gui users with the command
    |<tt class="literal">:TTemplate</tt>|. The argument should be name of
    the corresponding template file.  If the command is called
    without arguments (preferred usage), then a list of available
    templates is displayed and the user is asked to choose one of
    them.
   </p></div></div><div class="section" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both;"><a id="latex-macros"></a>3 Latex-Suite Macros</h2></div></div><div></div></div><p>
   Latex-Suite ships with a very comprehensive set of insert mode and
   |visual-mode| mappings and menu items to typeset most of the LaTeX
   elements.
  </p><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>
    These mappings are are not standard mappings in the sense that
    only the last character is mapped. See plugin/imaps.vim for
    further documentation. For example, in the case of the mapping
    <tt class="literal">EFI</tt> provided by Latex-Suite you can press the characters
    '<tt class="literal">E</tt>', '<tt class="literal">F</tt>' and '<tt class="literal">I</tt>'
    as slowly as you wish (unlike the normal <tt class="literal">imap</tt> command
    where <tt class="literal">timeout</tt> issues are involved). The characters are
    visible as you type them (unlike normal <tt class="literal">imap</tt>s) and you
    can use the movement or backspace key to correct yourself unlike normal
    mappings.
   </p></div><a id="place-holder"></a><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title"><a id="place-holders"></a>Place Holders</h3><p>
    Almost all macros provided in Latex-Suite implement Stephen Riem's bracketing
    system and Gergely Kontra's <tt class="literal">JumpFunc()</tt> for handling
    place-holders. This consists of using "place-holders" to mark off
    locations where the next relevant editing has to be done. As an example,
    when you type <tt class="literal">EFI</tt> in |insert-mode|, you will get the
    following:
    </p><pre class="programlisting">\begin{figure}[h]
    \centerline{\psfig{figure=&lt;+eps file+&gt;}}
    \caption{&lt;+caption text+&gt;}
    \label{fig:&lt;+label+&gt;}
\end{figure}&lt;++&gt;</pre><p>
    The text <tt class="literal">&lt;+eps file+&gt;</tt> will be selected and
    you will be left in |select-mode| so that you can continue typing
    straight away. After having typed in the file name, you can press
    <tt class="literal">&lt;Ctrl-J&gt;</tt> (while still in insert-mode). This will
    take you directly to the next "place-holder". i.e, <tt class="literal">&lt;+caption
     text+&gt;</tt> will be visually selected with Vim in select mode
    again for typing in the caption. This saves on a lot of key presses.
   </p></div><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title"><a id="overriding-macros"></a>Over-riding Latex-Suite Macros</h3><p>
    If you wish to change these macros from their default values, for
    example, if you wish to change <tt class="literal">`w</tt> to expand to
    <tt class="literal">\omega</tt> instead of its default expansion to
    <tt class="literal">\wedge</tt>, you should use the <tt class="literal">IMAP</tt>
    function as described in the <a href="#ls-new-macros" title="3.12 Making your own Macros via IMAP()">Using 
     IMAP()</a> section.
   </p><p>
    An important thing to note is that if you wish to over-ride macros
    created by Latex-Suite rather than merely create new macros, you should place
    the <tt class="literal">IMAP()</tt> calls in a script which gets sourced
    after the files in Latex-Suite. A good place typically is as a file-type
    plugin file in the
    <tt class="literal">~/.vim/after/ftplugin/</tt> directory. (Use
    <tt class="literal">~/vimfiles</tt> if you are using
    <tt class="literal">WINDOWS</tt>). For example to over-ride
    <tt class="literal">`w</tt> to <tt class="literal">\omega</tt> instead of
    <tt class="literal">\wedge</tt>, place the following line in (say)
    <tt class="literal">~/.vim/after/ftplugin/tex_macros.vim</tt>:
    </p><pre class="programlisting">call IMAP('`w', '\omega', 'tex')</pre><p>
   </p><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>
     It is important to use a file-name which will get sourced on a
     <tt class="literal">FileType</tt> event. Therefore you must use a file-name
     which conforms to the standards as described in
     <tt class="literal">|ftplugin-name|</tt>.
    </p></div></div><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title"><a id="pausing-imaps"></a>Pausing Macro expansion</h3><p>
    If you wish to temporarily suspend the imaps functionality, then you
    can set the <tt class="literal">Imap_FreezeImap</tt> to 1. If you set
    <tt class="literal">g:Imap_FreezeImap</tt> to 1, then it will be a
    system-wide setting. Setting <tt class="literal">b:Imap_FreezeImap</tt> will
    affect only the current buffer.
   </p></div><p>
   The following sections describe the various editing macros provided
   by Latex-Suite.
  </p><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="environment-mappings"></a>3.1 Environment Mappings</h3></div></div><div></div></div>
   Latex-Suite provides a rich set of mappings to insert, enclose and modify
   LaTeX environments, i.e, <tt class="literal">\begin{...} ... \end{...}</tt>
   pairs.
   <div class="section" lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="inserting-environments"></a>3.1.1 Inserting Environments</h4></div></div><div></div></div><p>
     Latex-Suite provides the following ways to insert environments
    </p><div class="section" lang="en"><div class="titlepage"><div><div><h5 class="title"><a id="inserting-env-f5"></a>3.1.1.1 Method 1: Pressing <tt class="literal">&lt;F5&gt;</tt></h5></div></div><div></div></div><p>
      If you press <tt class="literal">&lt;F5&gt;</tt> in the insert or normal
      mode while on an empty line, Latex-Suite prompts you with a list of
      environments you might want to insert. You can either choose one
      from the list or type in a new environment name.  If you press
      <tt class="literal">&lt;F5&gt;</tt> on a line which already has a word,
      then that word is used instead of prompting.
     </p><p>
      See <a href="#Tex_Env_name" title="11.3.1 Tex_Env_name">Tex_Env_name</a> for a
      description of how Latex-Suite uses the word to form the expansion and how
      to modify Latex-Suite's behavior.
     </p><p>
      The list of environments which Latex-Suite prompts you with (when
      <tt class="literal">&lt;F5&gt;</tt> is pressed on an empty line) is formed
      from the <a href="#Tex_PromptedEnvironments" title="11.3.10 g:Tex_PromptedEnvironments">Tex_PromptedEnvironments</a>
      setting.
     </p><p>
      In addition to this setting, Latex-Suite also lists envionments found in
      custom packages as described in the section <a href="#package-actions" title="4.2 Actions taken for supported packages">Package actions.</a>
     </p></div><div class="section" lang="en"><div class="titlepage"><div><div><h5 class="title"><a id="inserting-env-shift-f1"></a>3.1.1.2 Method 2: Using <tt class="literal">&lt;S-F1&gt;</tt>-<tt class="literal">&lt;S-F4&gt;</tt></h5></div></div><div></div></div><p>
      The shifted function keys, <tt class="literal">&lt;S-F1&gt;</tt> to
      <tt class="literal">&lt;S-F4&gt;</tt> can be mapped to insert very commonly
      used environments. The environments mapped to each key can be
      customized via the <a href="#Tex_HotKeyMappings" title="11.3.11 g:Tex_HotKeyMappings">g:Tex_HotKeyMappings</a> setting.
     </p></div><div class="section" lang="en"><div class="titlepage"><div><div><h5 class="title"><a id="inserting-env-threeletter"></a>3.1.1.3 Method 3: Using three letter sequences</h5></div></div><div></div></div><p>
      Environments can also be inserted by pressing a 3 capital letter
      sequence starting with an <tt class="literal">E</tt>. The sequence of 3
      letters generally tries to follow the following rules:
     </p><div class="orderedlist"><ol type="1"><li>
       All environment mappings begin with <tt class="literal">E</tt></li><li>
       If the environment can be broken up into 2 distinct words,
       such as flushright (flush + right), then the next 2 letters
       are the first letters of the 2 words.  Example:
       <pre class="programlisting">flushleft  (_f_lush + _l_eft)  ---&gt; EFL
flushright (_f_lush + _r_ight) ---&gt; EFR
eqnarray   (_e_qn + _a_rray)   ---&gt; EEA</pre>
       If on the other hand, the environment name cannot be broken
       up into 2 distinct words, then the next 2 letters are the
       first 2 letters of the name of the environment.
       Example:
       <pre class="programlisting">equation (_eq_uation)          ---&gt; EEQ</pre></li></ol></div><p>
      Unfortunately there are some environments that cannot be
      split in two words and first two letters in name are
      identical. In this case shortcut is created from E, first and
      last letter.  Example:
      </p><pre class="programlisting">quote     (_q_uot_e_)          ---&gt; EQE
quotation (_q_uotatio_n_)      ---&gt; EQN</pre><p>
      Of course, not every last one of the environments can follow
      this rule because of ambiguities. In case of doubt, pull down
      the Tex-Environments menu. The menu item should give the hint
      for the map.
     </p></div></div><div class="section" lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="enclosing-environments"></a>3.1.2 Enclosing in Environments</h4></div></div><div></div></div><p>
     Latex-Suite provides visual-mode mappings which enclose visually
     selected portions of text in environments. There are two ways provided
     to do this.
    </p><div class="section" lang="en"><div class="titlepage"><div><div><h5 class="title"><a id="enclosing-env-f5"></a>3.1.2.1 Method 1: Pressing <tt class="literal">&lt;F5&gt;</tt></h5></div></div><div></div></div><p>
      You can also select a portion of text visually and press
      <tt class="literal">&lt;F5&gt;</tt> while still in visual mode. This will
      prompt you with a list of environments. (This list can be customized
      via the <a href="#Tex_PromptedEnvironments" title="11.3.10 g:Tex_PromptedEnvironments">g:Tex_PromptedEnvironments</a>
      setting). You can either choose from this list or type in a new
      environment name. Once the selection is done, Latex-Suite encloses the
      visually selected portion in the chosen environment.
     </p></div><div class="section" lang="en"><div class="titlepage"><div><div><h5 class="title"><a id="enclosing-env-threeletter"></a>3.1.2.2 Method 2: Using three letter mappings</h5></div></div><div></div></div><p>
      You can also select text visually and press a sequence of three
      characters beginning with <tt class="literal">,</tt> (the single comma
      character) and the selected text will be enclosed in the chosen
      environment. The three letter sequence follows directly from the
      three letter sequence used to insert environments as described <a href="#inserting-env-threeletter" title="3.1.1.3 Method 3: Using three letter sequences">here</a>. The following
      example describes the rule used:
     </p><p>
      If <tt class="literal">ECE</tt> inserts a
      <tt class="literal">\begin{center}...\end{center}</tt> environment, then to
      enclose a block of selected text in
      <tt class="literal">\begin{center}...\end{center}</tt>, simply select the
      text and press <tt class="literal">,ce</tt>.  The rule simply says that the
      leading <tt class="literal">E</tt> is converted to <tt class="literal">,</tt> and
      the next 2 letters are small case.  
     </p></div><p>
     Some of the visual mode mappings are sensitive to whether you
     choose line-wise or character-wise. For example, if you choose a
     word and press <tt class="literal">,ce</tt>, then you get
     <tt class="literal">\centerline{word}</tt>, whereas if you press
     <tt class="literal">,ce</tt> on a line-wise selection, you get:
     </p><pre class="programlisting">\begin{center}
    line
\end{center}</pre><p>
    </p></div><div class="section" lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="changing-environments"></a>3.1.3 Changing Environments</h4></div></div><div></div></div><p>
     Pressing <tt class="literal">&lt;S-F5&gt;</tt> in normal mode detects which
     environment the cursor is presently located in and prompts you to
     replace it with a new one. The innermost environment is detected. For
     example, in the following source:
     </p><pre class="programlisting">\begin{eqnarray}
  \begin{array}{ccc}
    2 &amp; 3 &amp; 4
  \end{array}
\end{eqnarray}</pre><p>
     if you are located in the middle "2 &amp; 3 &amp; 4" line, then pressing
     <tt class="literal">&lt;S-F5&gt;</tt> will prompt you to change the array
     environment, not the eqnarray environment. In addition, Latex-Suite will also
     try to change lines within the environment to be consistent with the
     new environment. For example, if the original environment was an
     <tt class="literal">eqnarray</tt> environment with a
     <tt class="literal">\label</tt> command, then changing it to an
     <tt class="literal">eqnarray*</tt> environment will delete the
     <tt class="literal">\label</tt>.
    </p><p>
     Pressing <tt class="literal">&lt;F5&gt;</tt> in normal mode has the same
     effect as pressing <tt class="literal">&lt;F5&gt;</tt> in insert-mode,
     namely you will be prompted to choose an environment to insert.
    </p></div></div><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="latex-command-maps"></a>3.2 Command Mappings</h3></div></div><div></div></div>
   Latex-Suite provides a rich set of mappings to insert, enclose and modify
   LaTeX commands.
   <div class="section" lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="inserting-commands"></a>3.2.1 Inserting LaTeX commands</h4></div></div><div></div></div><a id="ls-imap-f7"></a><a id="ls-imap-s-f7"></a><p>
     Pressing <tt class="literal">&lt;F7&gt;</tt> in insert or normal mode while
     the cursor is touching a word will insert a command formed from the
     word touching the cursor. 
    </p><p>
     For certain common commands, Latex-Suite will expand them to include
     additional arguments as needed. For example, <tt class="literal">frac</tt>
     becomes <tt class="literal">\frac{&lt;++&gt;}{&lt;++&gt;}&lt;++&gt;</tt>. Otherwise, it will
     simply change the word under the cursor as follows 
     </p><pre class="programlisting">word --&gt; \word{&lt;++&gt;}&lt;++&gt;</pre><p> 
     You can define custom expansions
     of commands using the <tt class="literal">Tex_Com_{name}</tt> setting as
     described in <a href="#Tex_Com_name" title="11.3.2 Tex_Com_name">here</a>.
    </p><p>
     If <tt class="literal">&lt;F7&gt;</tt> is pressed when the cursor is on
     white-space, then Latex-Suite will prompt you to choose a command and insert
     that instead.The list of commands is constructed from the <a href="#Tex_PromptedCommands" title="11.3.12 g:Tex_PromptedCommands"><tt class="literal">g:Tex_PromptedCommands</tt></a>
     setting and also from commands which Latex-Suite finds while scanning custom
     packages which Latex-Suite finds. See the <a href="#package-actions" title="4.2 Actions taken for supported packages">Package actions</a> section for details
     on which files are scanned etc.
    </p></div><div class="section" lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="enclosing-commands"></a>3.2.2 Enclosing in a command</h4></div></div><div></div></div><p>
     You can select a portion of text visually and press
     <tt class="literal">&lt;F7&gt;</tt> while still in visual mode. This will
     prompt you with a list of commands. (This list can be customized
     via the <a href="#Tex_PromptedCommands" title="11.3.12 g:Tex_PromptedCommands">g:Tex_PromptedCommands</a>
     setting). You can either choose from this list or type in a new
     command name. Once the selection is done, Latex-Suite encloses the
     visually selected portion in the chosen command.
    </p></div><div class="section" lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="changing-commands"></a>3.2.3 Changing commands</h4></div></div><div></div></div><a id="ls-vmap-f7"></a><p>
     In both insert and normal mode <tt class="literal">&lt;S-F7&gt;</tt> will
     find out if you are presently within an environment and then prompt you
     with a list of commands to change it to.
    </p></div></div><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="font-maps"></a>3.3 Font Mappings</h3></div></div><div></div></div><p>
    These mappings insert font descriptions such as:
    <tt class="literal">\textsf{&lt;++&gt;}&lt;++&gt;</tt>
    with the cursor left in place of the first <a href="#place-holders">placeholder</a> (the &lt;++&gt; characters).
   </p><p>
    Mnemonic:
    </p><div class="orderedlist"><ol type="1"><li>first letter is always F (F for font)</li><li>next 2 letters are the 2 letters describing the font.</li></ol></div><p>
   </p><p>
    Example: Typing <tt class="literal">FEM</tt> in insert-mode expands to
    <tt class="literal">\emph{&lt;++&gt;}&lt;++&gt;</tt>.
   </p><p>
    Just like environment mappings, you can visually select an area and press
    <tt class="literal">`sf</tt> to have it enclosed in:
    <tt class="literal">\textsf{word}</tt>
    or
    </p><pre class="programlisting">{\sffamily
line
}</pre><p>
    depending on character-wise or line-wise selection.
   </p></div><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="section-mappings"></a>3.4 Section Mappings</h3></div></div><div></div></div><p>
    These maps insert LaTeX sections such as:
    </p><pre class="programlisting">\section{&lt;++&gt;}&lt;++&gt;</pre><p>
    etc. Just as in the case of environments and fonts, can be enclosed with a
    visual selection. The enclosing is not sensetive to character or line-wise
    selection.
   </p><p>
    Mnemonic: (make your own!)
    </p><pre class="programlisting">SPA for part
SCH for chapter
SSE for section
SSS for subsection
SS2 for subsubsection
SPG for paragraph
SSP for subparagraph</pre><p>
   </p><p>
    Example:
    SSE in insert mode inserts
    </p><pre class="programlisting">\section{&lt;++&gt;}&lt;++&gt;</pre><p>
    If you select a word or line and press <tt class="literal">,se</tt>, then you
    get
    </p><pre class="programlisting">\section{section name}</pre><p>
    The menu item in Tex-Environments.Sections have a sub-menu called
    'Advanced'. Choosing an item from this sub-menu asks a couple of questions
    (whether you want to include the section in the table of contents, whether
    there is a shorter name for the table of contents) and then creates a more
    intelligent template.
   </p></div><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="greek-letter-mappings"></a>3.5 Greek Letter Mappings</h3></div></div><div></div></div><p>
    Lower case
   </p><tt class="literal">`a</tt>   through <tt class="literal">`z</tt> expand to
   <tt class="literal">\alpha</tt> through <tt class="literal">\zeta</tt>.
   <p>
    Upper case:
   </p><pre class="programlisting">`D = \Delta
`F = \Phi
`G = \Gamma
`Q = \Theta
`L = \Lambda
`X = \Xi
`Y = \Psi
`S = \Sigma
`U = \Upsilon
`W = \Omega</pre><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>LaTeX does not support upper case for all greek alphabets.</p></div><p>Just like other Latex-Suite mappings, these mappings are not created using
    the standard <tt class="literal">imap</tt> command. Thus you can type slowly,
    correct using <tt class="literal">&lt;BS&gt;</tt> etc.</p></div><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="auc-tex-mappings"></a>3.6 Auc-Tex Key Bindings</h3></div></div><div></div></div><p>
    These are simple 2 key expansions for some very commonly used LaTeX
    elements:
   </p><pre class="programlisting">`^   Expands To   \Hat{&lt;++&gt;}&lt;++&gt;
`_   expands to   \bar{&lt;++&gt;}&lt;++&gt;
`6   expands to   \partial
`8   expands to   \infty
`/   expands to   \frac{&lt;++&gt;}{&lt;++&gt;}&lt;++&gt;
`%   expands to   \frac{&lt;++&gt;}{&lt;++&gt;}&lt;++&gt;
`@   expands to   \circ
`0   expands to   ^\circ
`=   expands to   \equiv
`\   expands to   \setminus
`.   expands to   \cdot
`*   expands to   \times
`&amp;   expands to   \wedge
`-   expands to   \bigcap
`+   expands to   \bigcup
`(   expands to   \subset
`)   expands to   \supset
`&lt;   expands to   \le
`&gt;   expands to   \ge
`,   expands to   \nonumber
`~   expands to   \tilde{&lt;++&gt;}&lt;++&gt;
`;   expands to   \dot{&lt;++&gt;}&lt;++&gt;
`:   expands to   \ddot{&lt;++&gt;}&lt;++&gt;
`2   expands to   \sqrt{&lt;++&gt;}&lt;++&gt;
`|   expands to   \Big|
`I   expands to   \int_{&lt;++&gt;}^{&lt;++&gt;}&lt;++&gt;</pre><p>
    (again, notice the convenient place-holders)
   </p><p>
    In addition the visual mode macros are provided:
   </p><pre class="programlisting">`(  encloses selection in \left( and \right)
`[  encloses selection in \left[ and \right]
`{  encloses selection in \left\{ and \right\}
`$  encloses selection in $$ or \[ \] depending on characterwise or
                                      linewise selection</pre></div><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="diacritic-mappings"></a>3.7 Diacritics</h3></div></div><div></div></div><p>
    These mappings speed up typing European languages which contain diacritic
    characters such as a-umlaut etc. 
    </p><pre class="programlisting">+&lt;l&gt;     expands to \v{&lt;l&gt;}
=&lt;l&gt;     expands to \'{&lt;l&gt;}</pre><p>
    where <tt class="literal">&lt;l&gt;</tt> is an alphabet.
   </p><pre class="programlisting">+}       expands to \"{a}
+:       expands to \^{o}</pre><p>
    Latex-Suite also ships with <a href="#smart-backspace">smart
     backspacing</a> functionality which provides another convinience while
    editing languages with diactritics.
   </p><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>Diacritics are disabled by default in Latex-Suite because they can
     sometimes be a little too intrusive. Moreover, most European users can
     nowadays use font encodings which display diacritic characters directly
     instead of having to rely on Latex-Suite's method of displaying diacritics.</p><p>Set the <a href="#Tex_Diacritics" title="11.3.7 g:Tex_Diacritics">g:Tex_Diacritics</a>
     variable to enable diacritics.</p></div></div><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="bibtex-bindings"></a>3.8 BibTeX Shortcuts</h3></div></div><div></div></div><p>
    Latex-Suite provides an easy way of entering bibliographic entries. Four
    insert-mode mappings: <tt class="literal">BBB</tt>, <tt class="literal">BBL</tt>,
    <tt class="literal">BBH</tt> and <tt class="literal">BBX</tt> are provided, all of
    which essentially act in the same manner. When you type any of these in
    insert-mode, you will get a prompt asking you to choose a entry type
    for the bibliographic entry.
   </p><p>
    When you choose an entry type, a bibliographic entry template will be
    inserted. For example, if you choose the option
    <tt class="literal">'book'</tt> via the map <tt class="literal">BBB</tt>, then
    the following template will be inserted:
    </p><pre class="programlisting">@BOOK{&lt;+key+&gt;,
    author = {&lt;++&gt;},
    editor = {&lt;++&gt;},
    title = {&lt;++&gt;},
    publisher = {&lt;++&gt;},
    year = {&lt;++&gt;},
    otherinfo = {&lt;++&gt;}
}&lt;++&gt;</pre><p>
   </p><p>
    <tt class="literal">&lt;+key+&gt;</tt> will be highlighted in select-mode and
    you can type in the bib-key. After that you can use
    <tt class="literal">&lt;Ctrl-J&gt;</tt> to navigate to successive locations
    in the template and enter new values.
   </p><p>
    <tt class="literal">BBB</tt> inserts a template with only the fields
    mandatorily required for a given entry type. <tt class="literal">BBL</tt>
    inserts a template with commony used extra options.
    <tt class="literal">BBH</tt> inserts a template with more options which are
    not as commonly used. <tt class="literal">BBX</tt> inserts a template with
    all the fields which the entry type supports.
   </p><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Mnemonic</h3><p>
     <tt class="literal">B</tt> for Bibliographic entry, <tt class="literal">L</tt>
     for Large entry, <tt class="literal">H</tt> for Huge entry, and
     <tt class="literal">X</tt> stands for all eXtras.
    </p></div><div class="section" lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="adding-bib-options"></a>3.8.1 Customizing Bib-TeX fields</h4></div></div><div></div></div><p>
     If you wish the <tt class="literal">BBB</tt> command to insert a few
     additional fields in addition to the fields it creates, then you will
     need to define global variables of the form
     </p><pre class="programlisting">g:Bib_{type}_options</pre><p>
     in you <tt class="literal">$VIM/ftplugin/bib.vim</tt> file, where
     <tt class="literal">{type}</tt> is a string like
     <tt class="literal">'article'</tt>, <tt class="literal">'book'</tt> etc. This
     variable should contain one of the letters defined in the following
     table
    </p><div class="informaltable"><table border="1"><colgroup><col><col></colgroup><thead><tr><th>Character</th><th>Field Type</th></tr></thead><tbody><tr><td>w</td><td>address</td></tr><tr><td>a</td><td>author</td></tr><tr><td>b</td><td>booktitle</td></tr><tr><td>c</td><td>chapter</td></tr><tr><td>d</td><td>edition</td></tr><tr><td>e</td><td>editor</td></tr><tr><td>h</td><td>howpublished</td></tr><tr><td>i</td><td>institution</td></tr><tr><td>k</td><td>isbn</td></tr><tr><td>j</td><td>journal</td></tr><tr><td>m</td><td>month</td></tr><tr><td>z</td><td>note</td></tr><tr><td>n</td><td>number</td></tr><tr><td>o</td><td>organization</td></tr><tr><td>p</td><td>pages</td></tr><tr><td>q</td><td>publisher</td></tr><tr><td>r</td><td>school</td></tr><tr><td>s</td><td>series</td></tr><tr><td>t</td><td>title</td></tr><tr><td>u</td><td>type</td></tr><tr><td>v</td><td>volume</td></tr><tr><td>y</td><td>year</td></tr></tbody></table></div><p>
     For example, by default, choosing <tt class="literal">'article'</tt> via
     <tt class="literal">BBB</tt> inserts the following template by default
     </p><pre class="programlisting">@ARTICLE{&lt;+key+&gt;,
    author = {&lt;++&gt;},
    title = {&lt;++&gt;},
    journal = {&lt;++&gt;},
    year = {&lt;++&gt;},
    otherinfo = {&lt;++&gt;}
}&lt;++&gt;</pre><p>
     However, if <tt class="literal">g:Bib_article_options</tt> is defined as
     <tt class="literal">'mnp'</tt>, then <tt class="literal">'article'</tt> will
     insert the following template
     </p><pre class="programlisting">@ARTICLE{&lt;+key+&gt;,
    author = {&lt;++&gt;},
    title = {&lt;++&gt;},
    journal = {&lt;++&gt;},
    year = {&lt;++&gt;},
    month = {&lt;++&gt;},
    number = {&lt;++&gt;},
    pages = {&lt;++&gt;},
    otherinfo = {&lt;++&gt;}
}&lt;++&gt;</pre><p>
    </p><p>
     If you have some other fields you wish to associate with an article
     which are not listed above, then you will have to use the
     <tt class="literal">Bib_{type}_extrafields</tt> option. This is a newline
     seperated string of complete field names which will be included in the
     template. For example, if you define
     </p><pre class="programlisting">let g:Bib_article_extrafields = "crossref\nabstract"</pre><p>
     then the article template will include the lines
     </p><pre class="programlisting">crossref = {&lt;++&gt;},
abstract = {&lt;++&gt;},</pre><p>
    </p><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>
      You will need to define <tt class="literal">Bib_*</tt> settings in your
      <tt class="literal">$VIMRUNTIME/ftplugin/bib.vim</tt> file.
     </p></div></div></div><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="smart-keys"></a>3.9 Smart Key Mappings</h3></div></div><div></div></div><p>
    Latex-Suite ships with the following smart keys:
   </p><p><a id="smart-backspace"></a><b>Smart Backspace.&nbsp;</b>
    Pressing <tt class="literal">&lt;BS&gt;</tt> in insert mode checks to see
    whether we are just after something like <tt class="literal">\'{a}</tt> and
    if so, deletes all of it. i.e, diacritics are treated as single
    characters for backspacing.
   </p><p><b>Smart Quotes.&nbsp;</b>
    Pressing <tt class="literal">"</tt> (english double quote) will insert
    <tt class="literal">``</tt> or <tt class="literal">''</tt> by making an
    intelligent guess about whether we intended to open or close a quote.
   </p><p><b>Smart Space.&nbsp;</b>
    Latex-Suite maps the <tt class="literal">&lt;space&gt;</tt> key in such a
    way that $ characters are not broken across lines. It does this by
    first setting <tt class="literal">tw=0</tt> so that Vim will not
    automatically break lines and then maps the
    <tt class="literal">&lt;space&gt;</tt> key to insert newlines keeping
    <tt class="literal">$$</tt>'s on the same line.
   </p><p><b>Smart Dots.&nbsp;</b>
    Pressing <tt class="literal">...</tt> (3 dots) results in
    <tt class="literal">\ldots</tt> outside math mode and
    <tt class="literal">\cdots</tt> in math mode.
   </p></div><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="altkey-mappings"></a>3.10 Alt Key Macros</h3></div></div><div></div></div><p>
    Latex-Suite utilizes a set of macros originally created by Carl Mueller in
    auctex.vim to make inserting all the <tt class="literal">\left ... \right</tt>
    stuff very easy and to also make some use of the heavily under-utilized
    <tt class="literal">&lt;Alt&gt;</tt> key. 
   </p><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>
     By default, typing <tt class="literal">Alt-&lt;key&gt;</tt> in Vim takes
     focus to the menu bar if a menu with the hotkey
     <tt class="literal">&lt;key&gt;</tt> exists. If in your case, there are
     conflicts due to this behavior, you will need to set
     </p><pre class="programlisting">set winaltkeys=no</pre><p>
     in your <tt class="literal">$VIM/ftplugin/tex.vim</tt> in order to use these
     maps.
    </p></div><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Customizing the maps</h3><p>
     If for some reason, you wish to not map the
     <tt class="literal">&lt;Alt&gt;</tt> keys, (some European users need to use
     the <tt class="literal">&lt;Alt&gt;</tt> key to enter diacritics), you can
     change these maps to other keys as described in the section <a href="#customize-alt-key-maps" title="10.1.2 Alt-Key mappings">Customizing Alt-key maps</a>.
    </p></div><div class="section" lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="Alt-L"></a>3.10.1 <tt class="literal">&lt;Alt-L&gt;</tt></h4></div></div><div></div></div><p>
     This is a polymorphic insert-mode mapping which expands to one of the
     following depending on the character just before the cursor location.
    </p><div class="informaltable"><table border="1"><colgroup><col align="cener"><col></colgroup><thead><tr><th align="cener">Character before cursor</th><th>Expansion</th></tr></thead><tbody><tr><td align="cener">(</td><td><tt class="literal">\left( &lt;++&gt; \right)</tt></td></tr><tr><td align="cener">[</td><td><tt class="literal">\left[ &lt;++&gt; \right]</tt></td></tr><tr><td align="cener">|</td><td><tt class="literal">\left| &lt;++&gt; \right|</tt></td></tr><tr><td align="cener">{</td><td><tt class="literal">\left\{ &lt;++&gt; \right\}</tt></td></tr><tr><td align="cener">&lt;</td><td><tt class="literal">\langle &lt;++&gt; \rangle</tt></td></tr><tr><td align="cener">q</td><td><tt class="literal">\lefteqn{&lt;++&gt;}&lt;++&gt;</tt></td></tr></tbody></table></div><p>
     If the character before the cursor is none of the above, then it will
     simply insert a <tt class="literal">\label{&lt;++&gt;}&lt;++&gt;</tt>.
    </p></div><div class="section" lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="Alt-B"></a>3.10.2 <tt class="literal">&lt;Alt-B&gt;</tt></h4></div></div><div></div></div><p>
     This insert-mode mapping encloses the previous character in
     <tt class="literal">\mathbf{}</tt>.
    </p></div><div class="section" lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="Alt-C"></a>3.10.3 <tt class="literal">&lt;Alt-C&gt;</tt></h4></div></div><div></div></div><p>
     In insert mode, this key is polymorphic as follows:
    </p><div class="orderedlist"><ol type="1"><li>
      If the previous character is a letter or number, then capitalize it and
      enclose it in <tt class="literal">\mathcal{}</tt>.
     </li><li>
      otherwise insert <tt class="literal">\cite{}</tt>.
     </li></ol></div><p>
     In visual mode, it will simply enclose the selection in
     <tt class="literal">\mathcal{}</tt>
    </p></div><div class="section" lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="Alt-I"></a>3.10.4 <tt class="literal">&lt;Alt-I&gt;</tt></h4></div></div><div></div></div><p>
     This mapping inserts an <tt class="literal">\item</tt> command at the
     current cursor location depending on which environment the cursor is
     enclosed in. The style of the <tt class="literal">\item</tt> command is
     dependent on the enclosing environment. By default,
     <tt class="literal">&lt;Alt-I&gt;</tt> has styles defined forthe following
     environments:
    </p><div class="informaltable"><table border="1"><colgroup><col><col></colgroup><thead><tr><th>Environment</th><th>Style</th></tr></thead><tbody><tr><td>itemize</td><td>\item </td></tr><tr><td>enumerate</td><td>\item </td></tr><tr><td>theindex</td><td>\item </td></tr><tr><td>thebibliography</td><td>\item[&lt;+biblabel+&gt;]{&lt;+bibkey+&gt;} &lt;++&gt;</td></tr><tr><td>description</td><td>\item[&lt;+label+&gt;] &lt;++&gt;</td></tr></tbody></table></div><p>
     <tt class="literal">&lt;Alt-I&gt;</tt> is intelligent enough to
     account for nested environments. For example,
     </p><pre class="programlisting">\begin{itemize}
    \item first item
    \item second item
          \begin{description}
              \item[label1] first desc
              \item[label2] second
              % &lt;Alt-I&gt; will insert "\item[&lt;+label+&gt;] &lt;++&gt;" if
              % used here
          \end{description}
    \item third item
    % &lt;Alt-I&gt; will insert "\item " when if used here.
\end{itemize}
% &lt;Alt-I&gt; will insert nothing ("") if used here</pre><p>
     </p><p>
     The style used by <tt class="literal">&lt;Alt-I&gt;</tt> can be customized
     using the <a href="#Tex_ItemStyle_environment" title="11.3.13 Tex_ItemStyle_environment"><tt class="literal">g:Tex_ItemStyle_environment</tt></a>
     variable.
    </p></div></div><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="custom-macros-menu"></a>3.11 Custom Macros</h3></div></div><div></div></div><p>
    This functionality available via the TeX-Suite.Macros menu, provides
    a way of inserting customized macros into the current file via the
    menu.
   </p><p>
    When Latex-Suite starts up, it scans the
    <tt class="literal">$VIM/ftplugin/latex-suite/macros/</tt> directory and
    creates a menu from the files found there. Each file is considered as
    a single macro. You can place your own macros in this directory,
    using <a href="#place-holders">placeholders</a> if wanted.
   </p><p>
    When you choose a macro from the menu, the corresponding file is read
    into the current buffer after the current cursor position. In non-gui
    mode, you can use the |TMacro| command instead of choosing from the
    menu. This command takes the macro file name as an argument. When
    called without arguments (preferred usage), then a list of avaiable
    macro files is displayed and the user is prompted to choose one of
    them).
   </p><p>
    There are some other tools provided in this menu, namely:
   </p><div class="informaltable"><table border="0"><colgroup><col><col></colgroup><tbody><tr><td>{New}</td><td>
        Creates a new (unnamed) buffer in the
        latex-suite/macros/ directory.  Use the command
        :TexMacroNew in non-gui mode.
       </td></tr><tr><td>{Edit}</td><td>
        Opens up the corresponding macro file for editing. Use
        |:TexMacroEdit| in non-gui mode. When you try to edit {macro}
        not from local directory Latex-Suite will copy it to your local
        directory with suffix "-local". If local copy already exists
        Latex-Suite prompt for overwriting it.
       </td></tr><tr><td>{Delete}</td><td>
        Deletes the corresponding macro. Use the prefixed numbers for
        fast navigation of menus. Use |:TexMacroDelete| in non-gui mode.
        When you choose to delete {macro} which is not in your local
        directory Latex-Suite will refuse to delete it.
       </td></tr><tr><td>{Redraw}</td><td>
        Rescans the macros/ directories and refreshes the macros list.
       </td></tr></tbody></table></div></div><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="ls-new-macros"></a>3.12 Making your own Macros via <tt class="literal">IMAP()</tt></h3></div></div><div></div></div><p>
    If you find the need to create your own macros, then you can use the
    <tt class="literal">IMAP()</tt> function provided with Latex-Suite. See <a href="#why-IMAP" title="3.12.1 Why use IMAP()">Why use <tt class="literal">IMAP()</tt></a> for a short
    explanation of why you might prefer <tt class="literal">IMAP()</tt> over
    Vim's standard <tt class="literal">:imap</tt> command. An example best
    explains the usage:
    </p><pre class="programlisting">:call IMAP('NOM', '\nomenclature{&lt;++&gt;}&lt;++&gt;', 'tex')</pre><p>
    This will create a Latex-Suite-style mapping, where if you type
    <tt class="literal">NOM</tt> in insert mode, you will get
    <tt class="literal">\nomenclature{&lt;++&gt;}&lt;++&gt;</tt> with the cursor left in
    place of the first <tt class="literal">&lt;++&gt;</tt> characters. See <a href="#ls-imaps-syntax" title="3.12.2 IMAP() syntax">IMAP() syntax</a> for
    a detailed explanation of the <tt class="literal">IMAP()</tt> command.
   </p><p>
    For maps which are triggered for a given filetype, the
    <tt class="literal">IMAP()</tt> command above should be put in the filetype
    plugin script for that file. For example, for tex-specific mappings,
    the <tt class="literal">IMAP()</tt> calls should go in
    <tt class="literal">$VIM/ftplugin/tex.vim</tt>. For globally visible maps,
    you will need to use the following in either your
    <tt class="literal">~/.vimrc</tt> or a file in your
    <tt class="literal">$VIM/plugin</tt> directory.
    </p><pre class="programlisting">augroup MyIMAPs
    au!
    au VimEnter * call IMAP('Foo', 'foo', '')
augroup END</pre><p>
   </p><div class="section" lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="why-IMAP"></a>3.12.1 Why use <tt class="literal">IMAP()</tt></h4></div></div><div></div></div><p>
     Using <tt class="literal">IMAP</tt> instead of Vim's built-in
     <tt class="literal">:imap</tt> command has a couple of advantages:
     </p><div class="orderedlist"><ol type="1"><li>
       The 'ttimeout' option will generally limit how easily you can type
       the left hand side for a normal <tt class="literal">:imap</tt>. if you type
       the left hand side too slowly, then the mapping will not be
       activated.
      </li><li>
       If you mistype one of the letters of the lhs, then the mapping is
       deactivated as soon as you backspace to correct the mistake.
      </li><li>
       The characters in lhs are shown on top of each other. This is fairly
       distracting. This becomes a real annoyance when a lot of characters
       initiate mappings.
      </li></ol></div><p>
    </p></div><div class="section" lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="ls-imaps-syntax"></a>3.12.2 IMAP() syntax</h4></div></div><div></div></div><p>
     Formally, the syntax which is used for the <tt class="literal">IMAP</tt>
     function is:
     </p><pre class="programlisting">call IMAP (lhs, rhs, ft [, phs, phe])</pre><p>
    </p><p>
     </p><div class="informaltable"><table border="1"><colgroup><col><col></colgroup><thead><tr><th>Argument</th><th>Explanation</th></tr></thead><tbody><tr><td>lhs</td><td><p>
           This is the "left-hand-side" of the mapping. When you use
           <tt class="literal">IMAP</tt>, only the last character of this word is
           actually mapped, although the effect is that the whole word is
           mapped.
          </p><p>
           If you have two mappings which end in a common
           <tt class="literal">lhs</tt>, then the mapping with the longer
           <tt class="literal">lhs</tt> is used. For example, if you do
           </p><pre class="programlisting">call IMAP('BarFoo', 'something', 'tex')
call IMAP('Foo', 'something else', 'tex')</pre><p>
            Then typing <tt class="literal">BarFoo</tt> inserts
            <tt class="literal">"something"</tt>, whereas <tt class="literal">Foo</tt> by
            itself inserts <tt class="literal">"something else"</tt>.
          </p><p>
           Also, the nature of <tt class="literal">IMAP()</tt> makes creating
           certain combination of mappings impossible. For example if you
           have
           </p><pre class="programlisting">call IMAP('foo', 'something', 'tex')
call IMAP('foobar', 'something else', 'tex')</pre><p>
           Then you will never be able to trigger <tt class="literal">"foobar"</tt>
           because typing <tt class="literal">"foo"</tt> will immediately insert
           <tt class="literal">"something"</tt>. This is the "cost" which you incur
           over the normal <tt class="literal">:imap</tt> command for the
           convinience of no 'timeout' problems, the ability to correct
           <tt class="literal">lhs</tt> etc.
          </p></td></tr><tr><td>rhs</td><td><p>
           The "right-hand-side" of the mapping. This is the expansion you
           will get when you type <tt class="literal">lhs</tt>.
          </p><p>
           This string can also contain special characters such as
           <tt class="literal">&lt;enter&gt;</tt> etc. To do this, you will need
           to specify the second argument in double-quotes as follows:
           </p><pre class="programlisting">:call IMAP('EFE', "\\begin{figure}\&lt;CR&gt;&lt;++&gt;\\end{figure}&lt;++&gt;", 'tex')</pre><p>
           With this, typing <tt class="literal">EFE</tt> is equivalent to typing
           in the right-hand side with all the special characters in
           insert-mode. This has the advantage that if you have filetype
           indentation set up, then the right hand side will also be
           indented just as if you had typed it in normally.
          </p><a id="IMAP_PutTextWithMovement"></a><p>
           You can also set up a Latex-Suite style mapping which calls a custom function
           as follows:
           </p><pre class="programlisting">:call IMAP('FOO', "\&lt;C-r&gt;=MyFoonction()\&lt;CR&gt;", 'tex')</pre><p>
           where <tt class="literal">MyFoonction</tt> is a custom function you have
           written. If <tt class="literal">MyFoonction</tt> also has to return a string
           containing <tt class="literal">&lt;++&gt;</tt> characters, then you will need to
           use the function <tt class="literal">IMAP_PutTextWithMovement()</tt>. An
           example best explains the usage:
          </p><pre class="programlisting">call IMAP('FOO', "\&lt;C-r&gt;=AskVimFunc()\&lt;CR&gt;", 'vim')
" Askvimfunc: Asks For Function Name And Sets Up Template 
" Description: 
function! AskVimFunc()
    let name = input('Name of the function : ')
    if name == ''
        let name = "&lt;+Function Name+&gt;"
    end
    let islocal = input('Is this function scriptlocal ? [y]/n : ', 'y')
    if islocal == 'y'
        let sidstr = '&lt;SID&gt;'
    else
        let sidstr = ''
    endif
    return IMAP_PutTextWithMovement( 
        \ "\" ".name.": &lt;+short description+&gt; \&lt;cr&gt;" .
        \ "Description: &lt;+long description+&gt;\&lt;cr&gt;" . 
        \ "\&lt;C-u&gt;function! ".name."(&lt;+arguments+&gt;)&lt;++&gt;\&lt;cr&gt;" . 
        \       "&lt;+function body+&gt;\&lt;cr&gt;" . 
        \ "endfunction \" "
        \ )
endfunction</pre><p>
          </p></td></tr><tr><td>ft</td><td><p>
           The file type for which this mapping is active. When this string
           is left empty, the mapping applies for all file-types. A filetype
           specific mapping will always take precedence.
          </p></td></tr><tr><td>phs, phe</td><td><p>
           If you prefer to write the <tt class="literal">rhs</tt> with characters
           other than <tt class="literal">&lt;+</tt> and <tt class="literal">+&gt;</tt>
           to denote place-holders, you can use the last 2 arguments to
           specify which characters in the <tt class="literal">rhs</tt> specify
           place-holders. By default, these are <tt class="literal">&lt;+</tt> and
           <tt class="literal">+&gt;</tt> respectively.
          </p><p>
           Note that the <tt class="literal">phs</tt> and <tt class="literal">phe</tt>
           arguments do not control what characters will be displayed for
           the placeholders when the mapping is actually triggered. What
           characters are used to display place-holders when you trigger an
           <tt class="literal">IMAP</tt> are controlled by the <a href="#Imap_PlaceHolderStart" title="11.2.2 g:Imap_PlaceHolderStart &amp; g:Imap_PlaceHolderEnd"><tt class="literal">Imap_PlaceHolderStart</tt></a>
           and <a href="#Imap_PlaceHolderEnd"><tt class="literal">Imap_PlaceHolderEnd</tt></a>
           settings.
          </p></td></tr></tbody></table></div><p>
    </p></div></div></div><div class="section" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both;"><a id="latex-packages"></a>4 Package Handling</h2></div></div><div></div></div><p>
   Latex-Suite has a lot of functionality written to ease working with packages.
   Packages here refers to files which you include into the LaTeX
   document using the <tt class="literal">\usepackage</tt> command.
  </p><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="inserting-packages"></a>4.1 Inserting package commands</h3></div></div><div></div></div><p>
    When you first invoke Latex-Suite, it scans the
    <tt class="literal">$VIM/ftplugin/latex-suite/packages</tt> directory for
    package script files and creates a menu from all the files found there.
    This menu is created under <tt class="literal">TeX-Suite &gt; Packages &gt;
     Supported</tt>. This menu contains a list of packages "supported"
    by Latex-Suite. When you choose one of the packages from this menu (for example
    the <tt class="literal">amsmath</tt> package), then a line of
    the form
    </p><pre class="programlisting">\usepackage[&lt;++&gt;]{amsmath}&lt;++&gt;</pre><p>
    will be inserted into the current file.
   </p><p>
    The <tt class="literal">\usepackage</tt> line can also be inserted in an easy
    manner in the current file by pressing <tt class="literal">&lt;F5&gt;</tt>
    while in the preamble of the current document. This will set up a prompt
    from the supported packages and ask you to choose from one of them. If
    you do not find the package you want to insert in the list, you can type
    in a package-name and it will use that. Pressing
    <tt class="literal">&lt;F5&gt;</tt> in the preamble on a line containing a
    single word will construct a <tt class="literal">\usepackage</tt> line from
    that word.
   </p><p>
    You can also use the <a href="#TPackage" title="10.2.5 :TPackage [{package, ...}]"><tt class="literal">TPackage</tt></a> to insert the
    <tt class="literal">\usepackage</tt> line.
   </p><p>
    Once you have inserted a <tt class="literal">\usepackage</tt> line, for
    supported packages, you can use the Options and Commands menus
    described in the <a href="#package-actions" title="4.2 Actions taken for supported packages">next section</a>.
   </p></div><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="package-actions"></a>4.2 Actions taken for supported packages</h3></div></div><div></div></div><p>
    Latex-Suite takes the following actions for packages detected when a file is
    loaded, or a new <tt class="literal">\usepackage</tt> line is inserted using
    one of the methods described in the <a href="#inserting-packages" title="4.1 Inserting package commands">previous section</a>.
   </p><p>
    If you are using the GUI and you have <a href="#Tex_Menus" title="11.8.1 g:Tex_Menus">g:Tex_Menus</a> set to 1, Latex-Suite will create the
    following sub-menus
   </p><table class="simplelist" summary="Simple list" border="0"><tbody><tr><td><tt class="literal">TeX-Suite &gt; Packages &gt; &lt;package&gt; Options</tt></td></tr><tr><td><tt class="literal">TeX-Suite &gt; Packages &gt; &lt;package&gt; Commands</tt></td></tr></tbody></table><p>
   </p><p>
    where <tt class="literal">&lt;package&gt;</tt> is the package you just
    inserted (or was detected). You can use these menus to insert commands,
    environments and options which Latex-Suite recognizes as belonging to this
    package.
   </p><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>
     While inserting an option, you need to position yourself in the
     appropritate place in the document, most commonly inside the square
     braces in the <tt class="literal">\usepackage[]{packname}</tt> command. Latex-Suite
     will not navigate to that location.
    </p></div><p>
    In addition to creating these sub-meuns, Latex-Suite will also scan the
    <tt class="literal">$VIM/ftplugin/latex-suite/dictionaries</tt> directory and
    if a dictionary file corresponding to the package file is found, then
    it will add the file to the <tt class="literal">'dict'</tt> setting in Vim
    so you can use the <tt class="literal">&lt;C-X&gt;&lt;C-K&gt;</tt> command to
    complete words from that file.
   </p><p>
    For example, the <tt class="literal">SIUnits</tt> package has a custom
    dictionary.
   </p><a id="latex-package-scanning"></a><p>
    If a package detected at startup is found by Latex-Suite in the current
    directory or in a location specified by the <a href="#Tex_TEXINPUTS" title="11.10.1 g:Tex_TEXINPUTS">g:Tex_TEXINPUTS</a> variable, Latex-Suite will
    scan the package for <tt class="literal">\newenvironment</tt> and
    <tt class="literal">newcommand</tt> lines and also append any commands and
    environments found to the list of commands and environments which you
    are prompted with when you press <a href="#inserting-env-f5" title="3.1.1.1 Method 1: Pressing &lt;F5&gt;"><tt class="literal">&lt;F5&gt;</tt></a> or <a href="#ls-imap-f7"><tt class="literal">&lt;F7&gt;</tt></a> in insert
    mode.
   </p></div><p>
   In addition, the <tt class="literal">TeX-Suite &gt; Packages</tt> menu also
   contains the following submenus
  </p><p><b>Update.&nbsp;</b>
   This command is to be invoked with the cursor placed on the package
   name. If the corresponding package is found, then a sub-menu with the
   supported commands and options is created.
  </p><p><b>Update All.&nbsp;</b>
   This function reads the preamble of the document for
   <tt class="literal">\usepackage</tt> lines and if Latex-Suite supports the detected
   packages, then sub-menus containing the package options and commands
   are created.
  </p><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="automatic-package-detection"></a>4.3 Automatic Package detection</h3></div></div><div></div></div><p>
    Whenever Latex-Suite begins editing a new LaTeX file, it scans it for
    <tt class="literal">\usepackage{name}</tt> lines, and if a supported package
    is found, then it will create sub-menus and add to the
    <tt class="literal">'dict'</tt> setting as described above.
   </p><p>
    If a <a href="#latex-master-file" title="9.2 Specifying which file to compile">master-file</a> has been specified,
    then it will scan that file instead of the current file. See the section
    <a href="#custom-packages" title="4.3.1 Custom Packages">Custom Packages</a>
    to see which files Latex-Suite will scan in more detail.
   </p><p>
    For all the packages detected in this manner, Latex-Suite will take certain
    actions as described in the section <a href="#package-actions" title="4.2 Actions taken for supported packages">package support.</a>.
   </p><div class="section" lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="custom-packages"></a>4.3.1 Custom Packages</h4></div></div><div></div></div><p>
     Often times, the preamble can become too long, and some people prefer
     to put most of their personalization in a custom package and include
     that using a <tt class="literal">\usepackage</tt> line. Latex-Suite tries to search
     such customs package for other <tt class="literal">\usepackage</tt> lines, so
     that supported packages included in this indirect manner can also be
     used to create sub-menus, extend the <tt class="literal">'dict'</tt> setting
     etc. The most obvious place to place such custom packages is in the
     same directory as the edited file. In addition, LaTeX also supports
     placing custom packages in places pointed to by the
     <tt class="literal">$TEXINPUTS</tt> environment variable.
    </p><p>
     If you use the <tt class="literal">$TEXINPUTS</tt> variable in LaTeX, and
     you wish Latex-Suite to search these custom packages for
     <tt class="literal">\usepackage</tt> lines, then you need to initialize the
     <a href="#Tex_TEXINPUTS" title="11.10.1 g:Tex_TEXINPUTS"><tt class="literal">g:Tex_TEXINPUTS</tt></a>
     variable.
    </p><p>
     The <tt class="literal">g:Tex_TEXINPUTS</tt> variable needs to be set in the
     same format which Vim uses for the <tt class="literal">'path'</tt> setting.
     This format is explained in detail if you do 
     </p><pre class="programlisting">:help file-searching</pre><p>
     from within Vim.
    </p><p>
     Therefore the value of <tt class="literal">g:Tex_TEXINPUTS</tt> will most
     probably be different from <tt class="literal">$TEXINPUTS</tt> which your
     native LaTeX distribution uses.
    </p><p>
     Example:
     </p><pre class="programlisting">let g:Tex_TEXINPUTS = '~/texmf/mypackages/**,./**'</pre><p>
     The <tt class="literal">**</tt> indicates that all directories below the
     directory <tt class="literal">~/texmf/mypackages</tt> and
     <tt class="literal">./</tt> are to be scanned for custom packages.
    </p><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>
      The present directory <tt class="literal">'.'</tt> is always searched. You
      need not incude that in <tt class="literal">g:Tex_TEXINPUTS</tt>.
     </p></div></div></div><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="supporting-packages"></a>4.4 Writing supporting for a package</h3></div></div><div></div></div><p>
    Supporting a package is easy and consists of writing a vim script with
    the same name as the package and placing it in the
    <tt class="literal">$VIM/ftplugin/latex-suite/packages</tt> directory. A
    package script should define two variables as described in the next two
    sections. In addition to these two variables, you can also define any
    functions, environment definitions etc. in this file.
   </p><div class="section" lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="d0e1639"></a>4.4.1 <tt class="literal">g:Tex_package_option_&lt;package&gt;</tt></h4></div></div><div></div></div><p>
     This setting is a string containing a comma seperated list of options
     supported by this package.
    </p><p>
     Example:
     </p><pre class="programlisting">g:Tex_pacakge_option_mypack = 'opt1,opt2=,sbr:group1,opt3,opt4'</pre><p>
     The <tt class="literal">=</tt> suffix means that the option takes a value.
     Use <tt class="literal">sbr:group name</tt> to seperate options into
     sub-menus. All successive options will be clubbed into the
     <tt class="literal">group1</tt> sub-menu till the next
     <tt class="literal">sbr:</tt> option is encountered.
    </p></div><div class="section" lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="d0e1662"></a>4.4.2 <tt class="literal">g:Tex_package_&lt;package&gt;</tt></h4></div></div><div></div></div><pre class="programlisting">    g:TeX_package_&lt;package&gt; = "pre:Command,pre:Command1"
More detailed example is in latex-suite/packages/exmpl file (slightly
outdated).
Here is short summary of prefixes which can be used in package files:
(x - place with cursor, &lt;++&gt; - |placeholder|)

{env:command}  Environment: creates simple environment template
            \begin{command}
                x
            \end{command}&lt;++&gt;
{eno:command}  Environment with option:
            \begin[x]{command}
                &lt;++&gt;
            \end{command}&lt;++&gt;
{ens:command[&lt;&lt;option&gt;&gt;]...}  Environment special:
            \begin[&lt;&lt;option&gt;&gt;]...{command}
                &lt;++&gt;
            \end{command}&lt;++&gt;
{bra:command} Brackets:
            \command{x}&lt;++&gt;
{brd:command} Brackets double:
            \command{x}{&lt;++&gt;}&lt;++&gt;
{brs:command[&lt;&lt;option&gt;&gt;]...} Brackets special (as environment special:
            \command[&lt;+x+&gt;]{&lt;++&gt;}{&lt;++&gt;}&lt;++&gt;
{nor:command} Normal:
            \command&lt;Space
{noo:command} Normal with option:
            \command[x]&lt;++&gt;
{nob:command} Normal with option and brackets:
            \command[x]{&lt;++&gt;}&lt;++&gt;
{pla:command} Plain:
            command&lt;Space
{spe:command} Special:
            command   &lt;-literal insertion of command
{sep:command} creates separator. Good for aesthetics and usability :)
{sbr:command} Breaks menu into submenus. &lt;command&gt; will be title of submenu.
            Can be used also in package variable.

Command can be also given without prefix:. The result is
           \command
          </pre></div></div></div><div class="section" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both;"><a id="latex-completion"></a>5 Latex Completion</h2></div></div><div></div></div><p>
   This module provides an easy way to insert references to labels and
   bibliographic entries. Although the completion capabilites are very
   diverse, Latex-Suite only uses a single key (<tt class="literal">&lt;F9&gt;</tt> by
   default) to do all of it. Pressing the <tt class="literal">&lt;F9&gt;</tt> key
   does different things based on where you are located. Latex-Suite tries to
   guess what you might be trying to complete at the location where you
   pressed <tt class="literal">&lt;F9&gt;</tt>. For example, pressing
   <tt class="literal">&lt;F9&gt;</tt> when you are within a
   <tt class="literal">\ref</tt> command will try to list the
   <tt class="literal">\label</tt>'s in the present directory. Pressing it when
   you are in a <tt class="literal">\cite</tt> command will list bibliography
   keys. Latex-Suite also recognizes commands which need a file name argument and
   will put up an explorer window for you to choose a filename.
  </p><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title"><a id="ls-set-grepprg"></a>Before you start with Latex-Suite's completion function...</h3><p>
    All of Latex-Suite's completion capabilities depend on a external program
    being available on your system which can search through a number of
    files for a reg-exp pattern. On *nix systems, the pre-installed
    <tt class="literal">grep</tt> utility is more than adequate.  Most windows
    systems come with a utility <tt class="literal">findstr</tt>, but that has
    proven to be very inadequate (for one, it does not have an option to
    force the file name to be displayed when searching through a single
    file). Your best bet is to install <a href="http://www.cygwin.com/" target="_top">cygwin</a>, but if you think thats
    overkill, you can <a href="http://www.google.com/search?q=windows%20gnu%20grep" target="_top">search
     for</a> a windows implementation of GNU grep. (Latex-Suite testing on
    windows has been done with cygwin's port of GNU grep).
   </p><p>
    Once you have a <tt class="literal">grep</tt> program installed, you need to
    set the <tt class="literal">'grepprg'</tt> option for vim. Make sure you use a
    setting which forces the program to display file names even when you are
    searching through a single file. For GNU grep, the syntax is
    </p><pre class="programlisting">set grepprg=grep\ -nH\ $*</pre><p>
   </p></div><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="ls-completion-usage"></a>5.1 Latex-Suite completion example</h3></div></div><div></div></div><p>
    Consider the situation where you are editing a file with two equations
    labelled <tt class="literal">eqn:euler</tt> and <tt class="literal">eqn:einstein</tt>.
    Now you want to insert a reference to one of these equations. To do this,
    you type the <tt class="literal">\ref{eqn:}</tt> command and with the cursor
    placed after <tt class="literal">eqn:</tt>, press <tt class="literal">&lt;F9&gt;</tt>.
    This will bring up two new windows beneath the main window you were working
    in as shown in the figure below. 
    </p><pre class="programlisting">      8 These are a couple of equations:
      9 +--  4 lines: eqnarray (eqn:euler) :   e^{j\pi} + 1 &amp;=&amp; 0---------------
     13 +--  4 lines: equation (eqn:einstein) :   E = m c^2---------------------
     17
     18 These are a couple of figures:
     19 +--  7 lines: figure (fig:monkeys) : Monkeys can Type-------------------
     26 +--  7 lines: figure (fig:shakespeare) : Shakespeare could not type-----
     33
     34 This is a reference to \ref{eqn:}&lt;++&gt;
     35
     36
     37 \end{document}
     38
~
~
~
newfile.tex                                                   34,32          Bot
newfile.tex|11| \label{eqn:euler}
newfile.tex|15| \label{eqn:einstein}
~
[Error List]                                                  1,1            All
      7
      8 These are a couple of equations:
      9 \begin{eqnarray}
     10   e^{j\pi} + 1 &amp;=&amp; 0
     11   \label{eqn:euler}
     12 \end{eqnarray}
     13 \begin{equation}
     14   E = m c^2
     15   \label{eqn:einstein}
     16 \end{equation}
newfile.tex [Preview]                                         11,3           21%
  </pre><p>
   </p><p>
    The first window (shown as <tt class="literal">[Error&nbsp;List]</tt> above) is a
    <tt class="literal">|cwindow|</tt> containing a list of possible matches for the
    reference. The cursor will be located in the first line of this window. The
    bottom window is a <tt class="literal">preview-window</tt> showing the context of
    the <tt class="literal">\label</tt>. Moving around in the
    <tt class="literal">[Error&nbsp;List]</tt> window automatically scrolls the
    preview window so as to always keep showing the context of the
    <tt class="literal">\label</tt> being viewed in the
    <tt class="literal">[Error&nbsp;List]</tt> window. You can also press
    <tt class="literal">J</tt> and <tt class="literal">K</tt> in the
    <tt class="literal">[ErrorList]</tt> window to scroll the preview window up and
    down.
   </p><p>
    To insert one of the labels, simply position the cursor in the correct line
    in the <tt class="literal">[Error&nbsp;List]</tt> window and press
    <tt class="literal">&lt;enter&gt;</tt>. This will immediately close the two newly
    opened windows, get back to the correct location in the original file being
    edited and insert the label into the <tt class="literal">\ref</tt> command. 
   </p><p>
    If you notice carefully in the example above, the
    <tt class="literal">[Error&nbsp;List]</tt> window only showed the matches for the
    equations and did not list any of the figure labels. This is because we
    pressed <tt class="literal">&lt;F9&gt;</tt> after <tt class="literal">\ref{eqn:</tt>
    instead of simply after <tt class="literal">\ref{</tt>. This caused Latex-Suite to
    search only for those labels which started with the string
    <tt class="literal">eqn:</tt>. If you had pressed
    <tt class="literal">&lt;F9&gt;</tt> after a <tt class="literal">\ref{</tt>, you would
    have been shown matches from <span class="emphasis"><em>all</em></span> labels, not just
    those starting with <tt class="literal">eqn:</tt>.
   </p><p>
    Thus prefixing all your labels with <tt class="literal">eqn:</tt>,
    <tt class="literal">fig:</tt>, <tt class="literal">tab:</tt> etc. depending on what you
    are labelling will lead to an easier time completing references.
   </p></div><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="ls-completion-ref"></a>5.2 Latex-Suite \ref completion</h3></div></div><div></div></div><p>
    If you press &lt;F9&gt; in insert mode when the cursor is positioned
    just after the string "<tt class="literal">\ref{pre</tt>", then Latex-Suite will
    present you with a list of all the <tt class="literal">\label</tt>s which
    begin with the prefix "pre". If you press &lt;F9&gt; after
    <tt class="literal">\ref{</tt>, then Latex-Suite will present you with a list of
    <span class="emphasis"><em>all</em></span> labels. See <a href="#ls-completion-usage" title="5.1 Latex-Suite completion example">here</a> for an example.
   </p><p>
    </p><div class="orderedlist"><ol type="1"><li>If <a href="#Tex_UseSimpleLabelSearch" title="11.5.3 Tex_UseSimpleLabelSearch">Tex_UseSimpleLabelSearch</a>
      is set to 1, then Latex-Suite will simply search for
      <tt class="literal">\label</tt>s in all the <tt class="literal">.tex</tt> files
      in the directory containing the current file</li><li>If the <a href="#Tex_ProjectSourceFiles" title="11.5.4 g:Tex_ProjectSourceFiles">Tex_ProjectSourceFiles</a>
      setting is non-empty, then Latex-Suite will search for all labels specified
      in the list of files given by the setting above.</li><li>If Tex_UseSimpleLabelSearch is 0 and Tex_ProjectSourceFiles
      is empty, then Latex-Suite uses the following logic:
      <div class="orderedlist"><ol type="a"><li>First Latex-Suite will determine if it can find a master-file
        specification as described <a href="#latex-master-file-specification">here</a>.</li><li>If it can, then Latex-Suite will search for
        <tt class="literal">\label</tt>'s in that file first.</li><li>If the master file <tt class="literal">\include</tt>'s or
        <tt class="literal">\input</tt>'s any other files, then Latex-Suite will search
        for <tt class="literal">\label</tt>'s in those files.  The search for
        <tt class="literal">\include</tt>'d and <tt class="literal">\input</tt>'ed files
        is recursive, i.e, if an <tt class="literal">\include</tt>'d file
        <tt class="literal">\include</tt>'s another file, then that will be
        searched as well and so on.</li><li>If Latex-Suite cannot find a master file specified for this file,
        then it will simply search for <tt class="literal">\labels</tt> in the
        present file.</li></ol></div></li></ol></div><p>
   </p><p>
    Any command which contains the pattern <tt class="literal">ref</tt> in it is
    treated as if it is a way to call <tt class="literal">\ref</tt> indirectly.
    Thus pressing <tt class="literal">&lt;F9&gt;</tt> after something like
    <tt class="literal">\pref{</tt> will also search for
    <tt class="literal">\label</tt>'s.
   </p><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">HINT</h3><p>
     By prefixing your labels with eqn:, fig: etc, you can easily filter
     out a lot of undesirable results.
    </p></div></div><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="latex-completion-cite"></a>5.3 Latex-Suite <tt class="literal">\cite</tt> completion</h3></div></div><div></div></div><p>
    When you press <tt class="literal">&lt;F9&gt;</tt> in insert mode after
    <tt class="literal">\cite{pre</tt>, Latex-Suite will present a list of valid
    bibliographic keys starting with <tt class="literal">"pre"</tt> and ask you
    to choose from one of them. ("pre" can be left empty in which case all
    valid bibliographic keys will be listed). The window setup is as
    described in section <a href="#ls-completion-usage" title="5.1 Latex-Suite completion example">Latex-Suite completion example</a>.
   </p><p>
    <tt class="literal">&lt;F9&gt;</tt> will also work in a similar way after any
    command which contains the word <tt class="literal">cite</tt> in it. For
    example, pressing <tt class="literal">&lt;F9&gt;</tt> will also work with
    <tt class="literal">\citenum</tt> etc.
   </p><p>
    The following logic is applied to find out which bibliographic entries
    are included in the completion.
   </p><div class="orderedlist"><ol type="1"><li><p>
      Firstly, if the present file has a <a href="#latex-master-file" title="9.2 Specifying which file to compile">master-file</a> defined for it, then Latex-Suite
      will perform the following steps on that file instead of on the
      current file.
     </p></li><li><p>
      First, the file is scanned for a <tt class="literal">\bibliography</tt>
      command. To explain better, assume that a command
      </p><pre class="programlisting">\bibliography{file1,file2}</pre><p> is found
      in the present file. For each bibliography file, say
      <tt class="literal">file1</tt>, Latex-Suite first tries to see if a
      <tt class="literal">.bib</tt> file, <tt class="literal">file1.bib</tt> can be
      found. If so, it will scan it for bib-keys of the form
      <tt class="literal">@BOOK{</tt> etc., and add these searches to the
      completion list. If a <tt class="literal">.bib</tt> file cannot be found,
      then it will try to see if <tt class="literal">file1.bbl</tt> can be found.
      If so, Latex-Suite will search it for bib-keys of the form
      <tt class="literal">\bibitem</tt> and add these to the completion list.
     </p><p>
      You can set the location where Latex-Suite will search for
      <tt class="literal">.bib</tt> and <tt class="literal">.bbl</tt> files using the
      <a href="#Tex_BIBINPUTS" title="11.5.2 g:Tex_BIBINPUTS"><tt class="literal">|Tex_BIBINPUTS|</tt></a>
      variable.
     </p></li><li><p>
      If a <tt class="literal">\bibliography</tt> command is not found, then Latex-Suite
      tries to scan the present file for a
      <tt class="literal">\begin{thebibliography}</tt> environment. If found,
      Latex-Suite searches the present file for bib-keys of the form
      <tt class="literal">\bibitem</tt>.
     </p></li><li><p>
      Finally, it will try to see if this file includes other files
      via the <tt class="literal">\input</tt> command. For each such file found,
      Latex-Suite will repeat the previous two steps stopping at the first file
      which has either a <tt class="literal">\bibliography</tt> command or a
      <tt class="literal">thebibliography</tt> environment.
     </p></li></ol></div><div class="section" lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="cite-search-caching"></a>5.3.1 Caching the <tt class="literal">\cite</tt> completion results</h4></div></div><div></div></div><a id="TClearCiteHist"></a><p>
     Often times, the editing cycle proceeds by first laying out a
     comprehensive bibliography and then completing all the
     <tt class="literal">\cite</tt> commands in one session. In such situations,
     it is inefficient to scan the whole list of bibliography files for
     bib-keys each time. Latex-Suite provides a way to cache the results of the
     cite completion search using the <a href="#Tex_RememberCiteSearch" title="11.5.5 g:Tex_RememberCiteSearch"><tt class="literal">Tex_RememberCiteSearch</tt></a>
     variable. If set, Latex-Suite will perform the search only the first time
     <tt class="literal">&lt;F9&gt;</tt> is used. Next time on, it will reuse the
     search results. If you wish to redo the search results, issue the
     command
     </p><pre class="programlisting">TClearCiteHist</pre><p>
     This will redo the completion list next time you use
     <tt class="literal">&lt;F9&gt;</tt>.
    </p></div></div><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="ls-filename-completion"></a>5.4 Latex-Suite filename completion</h3></div></div><div></div></div><p>
    When you press <tt class="literal">&lt;F9&gt;</tt> at a location where Latex-Suite
    guesses a filename needs to be typed, then a new explorer window will
    open up with the list of files. You can use this window to change
    directories etc. Pressing <tt class="literal">&lt;enter&gt;</tt> on a filename
    in the explorer window will automatically close the explorer window,
    return to the location where you pressed <tt class="literal">&lt;F9&gt;</tt>
    from and insert the filename into that position.
   </p><p>
    Latex-Suite also tries to guess what kinds of files you might not want to
    insert and hides those accordingly. For example, if you press
    <tt class="literal">&lt;F9&gt;</tt> when you are located at
    <tt class="literal">\includegraphics{</tt>, then Latex-Suite knows that you will not
    want to insert <tt class="literal">.tex</tt> files. Therefore, the explorer
    window will automatically hide these files.
   </p><p>
    As of now, Latex-Suite recognizes the following commands for filename
    completion. Along with the commands, this table also lists the
    files which Latex-Suite will not show for completing each command.
   </p><div class="informaltable"><table border="1"><colgroup><col><col></colgroup><thead><tr><th>command</th><th>hide pattern</th></tr></thead><tbody><tr><td><tt class="literal">\bibliography</tt></td><td><tt class="literal">'^\.,\.[^b]..$'</tt></td></tr><tr><td><tt class="literal">\include</tt><tt class="literal">\includeonly</tt></td><td><tt class="literal">'^\.,\.[^t]..$'</tt></td></tr><tr><td><tt class="literal">\includegraphics</tt><tt class="literal">\psfig</tt></td><td><tt class="literal">'^\.,\.tex$,\.bib$,\.bbl$,\.zip$,\.gz$'</tt></td></tr><tr><td><tt class="literal">\input</tt></td><td><tt class="literal">''</tt></td></tr></tbody></table></div></div><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="ls-completion-custom"></a>5.5 Custom command completion</h3></div></div><div></div></div><p>
    Latex-Suite also recognizes certain commonly used LaTeX commands for the
    <tt class="literal">&lt;F9&gt;</tt> key. At the moment, the
    <tt class="literal">\bibliographystyle</tt>, <tt class="literal">\addtocontents</tt>
    and the <tt class="literal">\addcontentsline</tt> commands are recognized,
    although morre will be added in the future. When you press the
    <tt class="literal">&lt;F9&gt;</tt> after such a command, Latex-Suite will prompt
    you with a list of arguments which make sense for the command.
   </p><p>
    This functionality is available for commands for which a global
    variable of the form
    <tt class="literal">g:Tex_completion_{&lt;command&gt;}</tt> is defined where
    <tt class="literal">&lt;command&gt;</tt> is the command name. This variable
    is a comma seperated list of values which this command takes. For
    example, the argument to the <tt class="literal">\bibliographystyle</tt>
    command is commonly one of <tt class="literal">abbr,alpha,plain,unsrt</tt>.
    Therefore, Latex-Suite defines
    </p><pre class="programlisting">let g:Tex_completion_bibliographystyle = 'abbr,alpha,plain,unsrt'</pre><p>
    You can define your own completion variables in a similar manner for
    commands which you might use.
   </p></div></div><div class="section" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both;"><a id="latex-compiling"></a>6 LaTeX Compiling</h2></div></div><div></div></div><p>
   This functionality, available via the TeX-Suite menu, provides various tools
   to compile and debug LaTeX files from within Vim.
  </p><p>
   If you are using commonly used LaTeX tools, then you should be all set
   as soon as you download and install Latex-Suite.  In order to compile a
   LaTeX file, simply press <tt class="literal">\ll</tt> while editing the file.
   This runs latex on the current file and displays the errors in a
   |quickfix-window| below the file being edited. You can then scroll
   through the errors and press <tt class="literal">&lt;enter&gt;</tt> to be
   taken to the location of the corresponding error. Along with the errors
   being listed in the quickfix window, the corresponding log file is also
   opened in |preview| mode beneath the quickfix window. It is scrolled
   automatically to keep in sync with the error being viewed in the
   quickfix window. You will be automatically taken to the location of the
   first error/warning unless you set the <a href="#Tex_GotoError" title="11.6.8 g:Tex_GotoError">g:Tex_GotoError</a> variable to 0.
  </p><p>
   Latex-Suite also supports compiling LaTeX into formats other than DVI. By
   default, Latex-Suite supports PDF and PS formats. In order to choose a format
   other than DVI, use the <tt class="literal">TTarget</tt> command or the
   <tt class="literal">TeX-Suite &gt; Target Format</tt> menu item. This will ask you
   to type in the name of the target format you want to compile to. If a rule
   has been defined for the format (as described in the next
   <a href="#compiler-rules" title="6.1 Setting Compilation rules">section</a>), then Latex-Suite will switch to
   that format.
  </p><p>Trying to choose a format for which no rule has been defined will
   result in Latex-Suite displaying a warning message without taking any action.
  </p><p>
   If you are using a multiple file project and need to compile a master
   file while editing other files, then Latex-Suite provides a way to specify the
   file to be compiled as described in <a href="#latex-master-file" title="9.2 Specifying which file to compile">latex-master-file</a>.
  </p><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="compiler-rules"></a>6.1 Setting Compilation rules</h3></div></div><div></div></div><p>
    In order to compile LaTeX files into various formats, Latex-Suite needs to know
    which external programs to call and in which way they need to be called.
    This information is provided to Latex-Suite via a number of "rules". For each
    format you want to compile to, you need to specify a rule. A rule is
    specified by defining a variable of the form:
    </p><pre class="programlisting">g:Tex_CompileRule_&lt;format&gt;</pre><p>
    where <tt class="literal">&lt;format&gt;</tt> is a string like
    <tt class="literal">"pdf"</tt>, <tt class="literal">"dvi"</tt> etc.
   </p><p>
    Example: By default, Latex-Suite uses the following rule for compiling LaTeX
    documents into DVI.
    </p><pre class="programlisting">g:Tex_CompileRule_dvi = 'latex --interaction=nonstopmode $*'</pre><p>
   </p><p>
    Default values are also provided for ps and pdf formats. You might want to
    change these rules in texrc according to your local tex environment.
   </p><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>
     For win32 users user MikTeX, sometimes the latex compiler's output has a
     bug where a single number is split across different lines. In this case,
     put the included <tt class="literal">vim-latex</tt> file distributed with Latex-Suite.
    </p></div></div><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="compiler-dependency"></a>6.2 Handling dependencies in compilation</h3></div></div><div></div></div><p>
    Latex-Suite also handles compiling dependencies automatically via certain
    rules which specify the "dependency chain" for each target format. 
    For example, if in your case, you use
    </p><pre class="programlisting">.tex -&gt; .dvi -&gt; .ps -&gt; .pdf</pre><p>
    to generate <tt class="literal">pdf</tt> files from <tt class="literal">dvi</tt>
    files, then you will need to specify the following setting in your
    Latex-Suite configuration (see <a href="#customizing-latex-suite" title="11 Customizing Latex-Suite">customizing Latex-Suite</a> for where
    these settings should go):
    </p><pre class="programlisting">let g:Tex_FormatDependency_pdf = 'dvi,ps,pdf'
</pre><p>
    This is a comma seperated string of formats specifying the order in
    which the formats to be compiled into should be chosen.  With this
    setting, if you set the target format to <tt class="literal">pdf</tt>, then
    the next time you compile via the <tt class="literal">\ll</tt> shortcut, Latex-Suite
    will first generate a <tt class="literal">dvi</tt> file, then use that to
    generate the <tt class="literal">ps</tt> file and finally create the
    <tt class="literal">pdf</tt> file from that.
   </p><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>
     If any of the intermediate formats is listed in the
     <tt class="literal">g:Tex_MultipleCompileFormats</tt> setting as described
     in the section <a href="#compiling-multiple" title="6.3 Compiling multiple times">Compiling multiple
      times</a>, then Latex-Suite might make multiple calls to the compiler to
     generate the output file of that format.
    </p></div><p>
    Along with the <tt class="literal">g:Tex_FormatDependency_{format}</tt>
    setting, you should ofcourse specify the rule for compiling to each of
    the formats as described in the <a href="#compiler-rules" title="6.1 Setting Compilation rules">previous
    section</a>. For example, with the setting above, you could use:
    </p><pre class="programlisting">let g:Tex_CompileRule_dvi = 'latex --interaction=nonstopmode $*'
let g:Tex_CompileRule_ps = 'dvips -Ppdf -o $*.ps $*.dvi'
let g:Tex_CompileRule_pdf = 'ps2pdf $*.ps'</pre><p>
   </p><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>
     By default, Latex-Suite does not specify any compiler dependencies. Each
     target format for which a rule has been derived will be compiled
     independently.
    </p></div></div><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="compiling-multiple"></a>6.3 Compiling multiple times</h3></div></div><div></div></div><p>
    Most LaTeX compilers need to be re-run several times in several
    commonly occuring situations in order to get a final camera ready copy.
    For example, when <tt class="literal">\label</tt>'s change, when new
    <tt class="literal">\cite</tt> commands are added etc. If the target format
    you are compiling to requires multiple compilations, then you will
    need to include the format in the
    <tt class="literal">g:Tex_MultipleCompileFormats</tt> setting. This is a
    comma seperated string of formats which need multiple compilations to
    be generated correctly.
   </p><p>
    By default, this setting contains just the <tt class="literal">dvi</tt>
    format. If you use the <tt class="literal">pdflatex</tt> compiler to generate
    <tt class="literal">pdf</tt> files, then you might want to also include
    <tt class="literal">pdf</tt> into the above setting.
   </p><p>
    For every format included in the
    <tt class="literal">g:Tex_MultipleCompileFormats</tt> setting described
    above, Latex-Suite will use the following logic to generate the file. Note
    that although the following description uses <tt class="literal">latex</tt>
    to refer to the compiler, it could be some other compiler such as
    <tt class="literal">pdflatex</tt> for generating <tt class="literal">pdf</tt>
    output.
   </p><p>
    </p><div class="orderedlist"><ol type="1"><li>If there was a <tt class="literal">.idx</tt> file, then remember
      its contents.</li><li>Run <tt class="literal">latex</tt>.</li><li>If the <tt class="literal">.idx</tt> file changed due to the latex
      compiler, then run <tt class="literal">makeindex</tt> to redo the
      <tt class="literal">.ind</tt> file and then remember to rerun latex.
     </li><li><p>
       If the <tt class="literal">.aux</tt> file generated by the latex
       compiler contains a <tt class="literal">\bibdata</tt> line, then it
       means that we are using a <tt class="literal">.bib</tt> file. Therefore,
       run <tt class="literal">bibtex</tt>.
      </p><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>
        This means that we will always run <tt class="literal">bibtex</tt>
        whenever we use the <tt class="literal">\bibliography</tt> command
        whether or not we actually need to. At this time, Latex-Suite does not
        parse the <tt class="literal">.aux</tt> file before and after the latex
        compiler to see if we are required to rerun
        <tt class="literal">bibtex</tt>.
       </p></div></li><li>
      If the <tt class="literal">.bbl</tt> file changes because of this, then
      remember to rerun latex again.
     </li><li>Also, we check to see if the LaTeX compiler gives certain
      standard warnings which notify that we need to compile once again. In
      this case also, remember to rerun LaTeX.</li><li>If we found we had to rerun latex, then we repeat
      the steps above but not running <tt class="literal">makeindex</tt> or
      <tt class="literal">bibtex</tt> again.</li></ol></div><p>
   </p><p>
    The LaTeX file is compiled atmost 5 times using this logic.  These
    steps will ensure that on most platforms/environments, you will get a
    clean output with all the cross-references, citations etc correctly
    labelled and ordered. 
   </p></div><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="compiler-output-customization"></a>6.4 Customizing the compiler output</h3></div></div><div></div></div><p>
    Most LaTeX compilers produce a very large amount of output during
    compilation, most of which is not relevant to debugging type-setting
    errors. The compiler plugin provided with Latex-Suite (which is an enhanced
    version of the standard compiler plugin maintained by Artem Chuprina),
    provides a way to filter the compiler output so that the actual
    errors/warnings can be presented much more concisely.
   </p><p>
    The compiler plugin is set up by default to function in a "non-verbose",
    "ignore-common-warnings" mode, which means that irrelevant lines from the
    compiler output will be ignored and some very common warnings are also
    ignored.
    Latex-Suite does this via the global variable <a href="#Tex_IgnoredWarnings" title="11.6.5 g:Tex_IgnoredWarnings"><tt class="literal">g:Tex_IgnoredWarnings</tt></a>.
    This is a list of patterns, which can be used to filter out (or ignore)
    some or the warnings and errors reported by the compiler. See the link
    above for its default value.
   </p><p>
    Latex-Suite uses the <a href="#Tex_IgnoreLevel" title="11.6.6 g:Tex_IgnoreLevel"><tt class="literal">g:Tex_IgnoreLevel</tt></a>
    setting to set a default ignore level. For example, for the default
    value of 4, Latex-Suite ignores warnings and errors matching the first 4
    patterns in <tt class="literal">g:Tex_IgnoredWarnings</tt>.
   </p><p>
    In addition to setting a default value of the ignore level, Latex-Suite
    provides the ability to set the level dynamically, using the
    <tt class="literal">TCLevel</tt> command. For example, if you issue the
    command:
    </p><pre class="programlisting">TCLevel 3</pre><p>
    from within Vim, then the next time you compile the document, Latex-Suite will
    ignore warnings and errors which match the first three patterns in
    <tt class="literal">g:Tex_IgnoredWarnings</tt>.
   </p><p>
    When TCLevel is called with the unquoted string strict as follows:
    </p><pre class="programlisting">TClevel strict</pre><p>
    then Latex-Suite switches to a "verbose", "no-lines-ignored" mode which is useful
    when you want to make final checks of your document and want to be careful
    not to let things slip by.
   </p><p>
    See the explanation of the settings <a href="#Tex_IgnoredWarnings" title="11.6.5 g:Tex_IgnoredWarnings">g:Tex_IgnoredWarnings</a> and <a href="#Tex_IgnoreLevel" title="11.6.6 g:Tex_IgnoreLevel">g:Tex_IgnoreLevel</a> to find out how to
    customize the filtering done by Latex-Suite
   </p></div><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="part-compiling"></a>6.5 Compiling parts of a file</h3></div></div><div></div></div><p>
    Latex-Suite also provides a way to compile a fragment of a document. This can be
    very useful while debugging a complex equation or one chapter in a book,
    etc. 
   </p><p>
    To do this, visually select a portion of the text and press
    <tt class="literal">\ll</tt> while in visual mode. The visually selected portion
    will be saved to a temporary file with the preamble from the current
    document prepended. Latex-Suite will then switch focus to this temporary file and
    compile it. Continue to debug this file as required and then replace the
    portion of the original file with this one. 
   </p><p>
    Pressing <tt class="literal">\lv</tt> while viewing the temporary file will
    view the output file generated from the temporary file, not the original
    file
   </p><p>
    Two commands |TPartComp| and |TPartView| are provided to be able to get
    this functionality via the command line.
   </p><p>
    From release 1.6 onwards of Latex-Suite, the temporary file created
    for part compilation will reside in the same directory as the file from
    which the fragment is being created. This ensures that any relative
    path-names defined in the fragment will still work. Latex-Suite will
    attempt to clean the temporary file(s) created when Vim exits.
   </p></div></div><div class="section" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both;"><a id="latex-viewing"></a>7 Latex Viewing and Searching</h2></div></div><div></div></div><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="latex-viewing-rules"></a>7.1 Setting Viewing rules</h3></div></div><div></div></div><p>
    In order to view the output files created by compiling the source
    files, you need to specify which external program Latex-Suite should call. You
    can specify the external program using one of two settings
    <a href="#Tex_ViewRule_format" title="11.7.1 g:Tex_ViewRule_&lt;format&gt;">Tex_ViewRule_format</a> or <a href="#Tex_ViewRuleComplete_format" title="11.7.2 Tex_ViewRuleComplete_&lt;format&gt;">Tex_ViewRuleComplete_format</a>.
    By default, Latex-Suite has default settings for viewing various common output
    formats via the <tt class="literal">Tex_ViewRule_format</tt> settings, so
    that if you are using commonly used programs, you should be all set to
    view compiled files from within Vim by simply pressing
    <tt class="literal">\lv</tt>.
   </p><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>
     The viewing function also takes the <a href="#latex-master-file" title="9.2 Specifying which file to compile"><tt class="literal">*.latexmain</tt></a> file
     into account to decide which file to show.
    </p></div><p>
    If pressing <tt class="literal">\lv</tt> does not work, then it most probably
    has to do with incorrect settings of the <a href="#Tex_ViewRule_format" title="11.7.1 g:Tex_ViewRule_&lt;format&gt;"><tt class="literal">g:Tex_ViewRule_&lt;format&gt;</tt></a>
    where <tt class="literal">&lt;format&gt;</tt> is the format you are
    attempting to view. See the link above for how to set this according to
    your system.
   </p><p>
    In addition to viewing the files, Latex-Suite also supports forward and inverse
    searching for certain common tools for viewiing DVI documents. At the
    moment, there is built-in support for YAP on windows (which ships with
    MikTeX), and the popular <tt class="literal">xdvi</tt> on *nix platforms. See
    the next few sections for details on forward and inverse searching.
   </p></div><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="forward-searching"></a>7.2 Forward Searching DVI documents</h3></div></div><div></div></div><p>
    Forward searching refers to making a DVI viewer display a given document
    at a given location from within Vim. At present, this functionality is
    supported for <tt class="literal">YAP</tt> on windows and
    <tt class="literal">xdvi</tt> on *nix machines. Pressing
    <tt class="literal">\ls</tt> from within Vim should make the DVI viewer
    display the portion of the document where your cursor is placed.
   </p><a id="enabling-searching"></a><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Enabling Forward and Inverse Searching</h3><p>
     Most DVI viewers need "source-special" information in order to do
     forward (and inverse) searching. This information is embedded in the
     <tt class="literal">dvi</tt> file if the LaTeX source is compiled with the
     <tt class="literal">--src-specials</tt> option. By default, Latex-Suite does not
     supply this argument to the compiler. See the section on
     <tt class="literal"><a href="#Tex_CompileRule_format" title="11.6.2 g:Tex_CompileRule_&lt;format&gt;">g:Tex_CompileRule_dvi</a></tt>
     to find out how this option can be set.
    </p></div></div><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="inverse-searching"></a>7.3 Inverse Searching</h3></div></div><div></div></div><p>
    Inverse searching refers to the DVI viewer telling Vim to display the
    LaTeX source file at a given location when you double-click in the DVI
    viewer window.
   </p><p>
    You will need to <a href="#enabling-searching">enable
     searching</a> in order to use this functionality.
   </p><p>
    You will also need to specify certain settings to the DVI viewer
    conveying the syntax which it needs to use to tell Vim how to display
    the source file. In <tt class="literal">YAP</tt>, you can set this option in
    <tt class="literal">View &gt; Options &gt; Inverse Search</tt>. The
    <tt class="literal">Command Line</tt> field needs to be set as follows:
    </p><pre class="programlisting">"C:\Program Files\vim\vim61\gvim" -c ":RemoteOpen +%l %f"</pre><p>
    The command <tt class="literal">:RemoteOpen</tt> is supplied when you install
    Latex-Suite.
   </p><p>
    On *nix machines, Latex-Suite attempts to call the DVI viewer in such a way
    that it already knows how to communicate with Vim. If this does not
    seem to be working, you can use the <tt class="literal">RemoteOpen</tt>
    command described above.
   </p></div></div><div class="section" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both;"><a id="latex-folding"></a>8 Latex Folding</h2></div></div><div></div></div><p>
   Latex-Suite ships with the plugin SyntaxFolds.vim which is a plugin for
   creating "fake" syntax folds on the fly. The fold method is actually manual
   but the folding is based on LaTeX syntax. This offers a speed increase over
   regular syntax folding. Ofcourse it has the disadvantage that the folds are
   not dynamic, i.e newly created syntax items are not automatically folded up.
   (This is a compromise between speed and convinience).
  </p><p>
   When you open up a LaTeX file, all the portions will be automatically folded
   up. However, no new folds will be created until you press
   <tt class="literal">&lt;F6&gt;</tt> or <tt class="literal">\rf</tt>. (rf
   stands for "refresh folds").
  </p><p>
   The fold-text is set to the first line of the folded text unless the fold is a
   table, figure etc. (an environment). In this case, if a \caption and/or a
   label is found in the folded region, then those are used to make a more
   meaningful fold-text, otherwise the second line of the environment is displayed
   along with the name of the environment. In other words, the following
   </p><pre class="programlisting">\begin{figure}[h]
    \centerline{\psfig{figure=slidercrank.eps,height=6cm}}
    \caption{The Slider Crank Mechanism.}
    \label{fig:slidercrank}
\end{figure}
% a LaTeX comment.
\begin{eqnarray}
    \sin(\pi) = 0
\end{eqnarray}</pre><p>
  </p><p>
   will be shown as:
   </p><pre class="programlisting">+---  5 lines: figure (fig:slidercrank) : The Slider Crank Mechanism. -----
% a LaTeX comment.
+---  3 lines: eqnarray () : \sin(\pi) = 0 --------------------------------</pre><p>
  </p><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="default-folding"></a>8.1 Default Folding Scheme in Latex-Suite</h3></div></div><div></div></div><p>
    By default Latex-Suite creates folds in the following manner:
   </p><pre class="programlisting">\chapter
\section
%%fakesection
    \subsection
        \subsubsection
            \item
                \equation
                \eqnarray
                \figure
                \table
                \footnote</pre><p>
    The indentation shows the "nestedness" of the folding scheme.
    See the <a href="#customizing-what-to-fold" title="8.2 Customizing what to fold">next section</a> to
    see how you can change this scheme.
   </p></div><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="customizing-what-to-fold"></a>8.2 Customizing what to fold</h3></div></div><div></div></div><p>
    From version 1.6 onwards, the folding in Latex-Suite can be controlled
    to a large extent via a number of global variables.
   </p><div class="section" lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="Tex_FoldedSections"></a>8.2.1 Tex_FoldedSections</h4></div></div><div></div></div><p>
     This entry defines which sections will be folded. This
     setting is a comma seperated list of section names. 
     The default value is:
     </p><pre class="programlisting">part,chapter,section,%%fakesection,
subsection,subsubsection,paragraph</pre><p>
     Each of the entries in the list will fold up a section of the
     corresponding name. The <tt class="literal">%%fakesection</tt> section is
     provided as a means for the user to group lines into "fake" sections.
     A <tt class="literal">%%fakesection</tt> is assumed to start on a line which
     begins with the string <tt class="literal">%%fakesection</tt> and continue
     till the start of the next <tt class="literal">\section</tt>,
     <tt class="literal">\subsection</tt> or any other section.
    </p><p>
     See also <a href="#fold-setting-advanced" title="8.2.5 Advanced Fold setting details">advanced fold
      settings</a>.
    </p></div><div class="section" lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="Tex_FoldedEnvironments"></a>8.2.2 Tex_FoldedEnvironments</h4></div></div><div></div></div><p>
     This entry defines which environments will be folded. It is a
     comma seperated string of words each of which defines a single
     environment. The default settng is
     </p><pre class="programlisting">verbatim,comment,eq,gather,
align,figure,table,thebibliography,
keywords,abstract,titlepage</pre><p>
     The words need not be standard Latex environments. You can
     add any word you like. Also, each word will fold up all
     environments whose name begins with that word. For example, in
     the setting above, the word <tt class="literal">"eq"</tt> folds up the
     <tt class="literal">\begin{equation}</tt>,
     <tt class="literal">\begin{eqnarray}</tt>,
     <tt class="literal">\begin{eqnarray*}</tt> environments. To avoid
     this, you can replace the word <tt class="literal">"eq"</tt> with
     <tt class="literal">"eq}"</tt>.
    </p><p>
     See also <a href="#fold-setting-advanced" title="8.2.5 Advanced Fold setting details">advanced fold
      settings</a>.
    </p></div><div class="section" lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="Tex_FoldedCommands"></a>8.2.3 Tex_FoldedCommands</h4></div></div><div></div></div><p>
     This entry defines which commands will be folded. It is a comma
     seperated string of words each of which defines a single command.
     The default setting is empty, i.e no commands are folded.
     The words need not be standard Latex commands. You can use whatever
     words you like. Each word will fold all commands whose name begins
     with that word as in the case of the <a href="#Tex_FoldedEnvironments" title="8.2.2 Tex_FoldedEnvironments">Tex_FoldedEnvironments</a>
     variable.
    </p><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>
      It is very difficult to fold commands reliably because it is very
      difficult to create a regexp which will match a line containing
      unmatched parentheses (or curly brackets), but will not match a line
      containing matched parentheses.
     </p><p>
      Just to make things safer, only lines which start a command but do
      not contain additional curly braces after the command has started are
      folded. In other words, if you wanted to fold the the command
      <tt class="literal">"mycommand"</tt>, then the  lines
      </p><pre class="programlisting">\mycommand{This is a line
and some more text on the next line
}</pre><p>
      will be folded, but the lines
      </p><pre class="programlisting">\mycommand{This is a \textbf{line}
and some more text
}</pre><p>
      will not be folded. This is a bug which is very difficult to fix.
     </p></div><p>
     See also <a href="#fold-setting-advanced" title="8.2.5 Advanced Fold setting details">advanced fold
      settings</a>.
    </p></div><div class="section" lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="Tex_FoldedMisc"></a>8.2.4 Tex_FoldedMisc</h4></div></div><div></div></div><p>
     This entry defines fold syntax for certain items which do not
     naturally fit into the section, environment of command lists. It is a
     comma seperated list of words. The default value is:
     </p><pre class="programlisting">item,preamble,&lt;&lt;&lt;</pre><p>
     </p><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>
       Unlike the other Tex_FoldedXXXX variables, the words in this setting
       are limited to take values from the following list:
      </p><p>
       </p><div class="informaltable"><table border="1"><colgroup><col><col></colgroup><thead><tr><th>Value</th><th>Meaning</th></tr></thead><tbody><tr><td>comments</td><td>Folds up contiguous blocks of comments</td></tr><tr><td>item</td><td>Folds up the <tt class="literal">\item</tt>s within list
            environments</td></tr><tr><td>preamble</td><td>Folds up the preamble of a document. (The part between
            the <tt class="literal">\documentclass</tt> command and the
            <tt class="literal">\begin{document}</tt> environment)</td></tr><tr><td><tt class="literal">&lt;&lt;&lt;</tt></td><td>Folds defined manually by the user using the
            <tt class="literal">&lt;&lt;&lt;</tt> and
            <tt class="literal">&gt;&gt;&gt;</tt> strings as fold-markers.</td></tr></tbody></table></div><p>
       Any other words in the <tt class="literal">Tex_FoldedMisc</tt> setting
       are silently ignored.
      </p></div><p>
    </p><p>
     See also <a href="#fold-setting-advanced" title="8.2.5 Advanced Fold setting details">advanced fold
      settings</a>.
    </p></div><div class="section" lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="fold-setting-advanced"></a>8.2.5 Advanced Fold setting details</h4></div></div><div></div></div><p>
     The order of the words in the <tt class="literal">Tex_FoldedXXXX</tt>
     variables is <span class="emphasis"><em>important</em></span>. The order defines the
     order in which the folds are nested. For example, the value
     <tt class="literal">"subsection,section"</tt> for the
     <tt class="literal">Tex_FoldedSections</tt> variable will not fold any
     subsections at all. This is because the folds are created in the
     <span class="emphasis"><em>reverse</em></span> order in which they occur in the
     <tt class="literal">Tex_FoldedSections</tt> setting and also, once a fold is
     created, the interior of the fold is not examined for creating
     additional folds. In the above case, this means that a
     <tt class="literal">\section</tt> is folded first and then its interior is
     not examined further. The correct value should have been
     <tt class="literal">"section,subsection"</tt>
    </p><a id="fold-setting-adding"></a><p>
     Each of the fold setting variables
     <tt class="literal">Tex_FoldedSections</tt>,
     <tt class="literal">Tex_FoldedEnvironments</tt> etc., as explained previously
     is a comma seperated string of variables. However, to make it easier
     to <span class="emphasis"><em>add</em></span> to the default settings without having to
     repeat the whole default setting again, Latex-Suite uses the following logic
     in forming the complete setting string from the
     <tt class="literal">Tex_FoldedXXXX</tt> variables. If the variable starts with
     a comma, then <tt class="literal">Tex_FoldedXXXX</tt> is added to the end of
     the default string rather than replacing it. Similarly, if it ends
     with a comma, then it will be prepended to the beginning of the
     default setting rather than replacing it.
    </p><p>
     For example, if <tt class="literal">Tex_FoldedEnvironments</tt> is set to the
     string <tt class="literal">"myenv"</tt>, then only an environment of the
     form <tt class="literal">\begin{myenv}</tt> will be folded. However, if the
     <tt class="literal">Tex_FoldedEnvironments</tt> setting is
     <tt class="literal">",myenv"</tt>, then the <tt class="literal">\begin{myenv}</tt>
     environment will be folded after all other environments in the default
     setting have been folded. On the other hand if
     <tt class="literal">Tex_FoldedEnvironments</tt> is of the form
     <tt class="literal">"myenv,"</tt>, the <tt class="literal">\begin{myenv}</tt>
     environment will be folded before the rest of the environments in the
     default setting.
    </p></div></div><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="editing-folding"></a>8.3 Editing the folding.vim file directly</h3></div></div><div></div></div><p>
    If you are using version 1.5 of Latex-Suite or older, you will need to
    directly edit the
    <tt class="literal">$VIM/ftplugin/latex-suite/folding.vim</tt> file if you
    wish to modify the folding scheme.  You will need to modify the
    function <tt class="literal">MakeTexFolds()</tt> defined in that file to
    modify the fold syntax.  <tt class="literal">MakeTexFolds</tt> makes a number
    of calls to <tt class="literal">AddSyntaxFoldItem</tt>. Each such call
    defines a new "fold item". The order in which these calls are made
    defines how the folds are nested. For example, if you desire an
    <tt class="literal">figure</tt> environment to be nested within a
    <tt class="literal">section</tt>, then you should define the fold for the
    <tt class="literal">figure</tt> first. The syntax of
    <tt class="literal">AddSyntaxFoldItem</tt> is as follows:
    </p><pre class="programlisting">AddSyntaxFoldItem(startpat, endpat, startoff, endoff [, startskip, endskip])</pre><p>
    If the last two arguments are omitted, then they are assumed to default
    to the empty strings <tt class="literal">''</tt>.
    The explanation for each argument is as follows:
   </p><div class="informaltable"><table border="1"><colgroup><col><col></colgroup><thead><tr><th>Argument</th><th>Explanation</th></tr></thead><tbody><tr><td><tt class="literal">startpat</tt></td><td>a line matching this pattern defines
        the beginning of a fold.
       </td></tr><tr><td><tt class="literal">endpat</tt></td><td>
        a line matching this pattern defines the end of a fold.
       </td></tr><tr><td><tt class="literal">startoff</tt></td><td>
        this is the offset from the starting line at which folding will
        actually start
       </td></tr><tr><td><tt class="literal">endoff</tt></td><td>
        like <tt class="literal">startoff</tt>, but gives the offset of the
        actual fold end from the line satisfying <tt class="literal">endpat</tt>.
        <tt class="literal">startoff</tt> and <tt class="literal">endoff</tt> are
        necessary when the folding region does not have a specific end
        pattern corresponding to a start pattern. for example in LaTeX,
        <tt class="literal">\section{Section Name}</tt> defines the beginning of
        a section, but there is no command which specifically ends a
        section. Thus a <tt class="literal">\section</tt>  is assumed to end 1
        line <span class="emphasis"><em>before</em></span> another section starts.
       </td></tr><tr><td><tt class="literal">startskip</tt></td><td>
        A Pattern Which Defines The Beginning Of A "Skipped" Region.

        For example, suppose we define a \itemize fold as follows:
        <pre class="programlisting"><tt class="literal">startpat</tt> =  '^\s*\\item',
<tt class="literal">endpat</tt> = '^\s*\\item\|^\s*\\end{\(enumerate\|itemize\|description\)}',
<tt class="literal">startoff</tt> = 0,
<tt class="literal">endoff</tt> = -1</pre>

        This defines a fold which starts with a line beginning with an
        <tt class="literal">\item</tt> and ending one line before a line beginning with an
        <tt class="literal">\item</tt> or <tt class="literal">\end{enumerate}</tt> etc.

        Then, as long as <tt class="literal">\item</tt>'s are not nested things are fine.
        However, once items begin to nest, the fold started by one
        <tt class="literal">\item</tt> can end because of an
        <tt class="literal">\item</tt> in an <tt class="literal">\itemize</tt>
        environment within this <tt class="literal">\item</tt>. i.e, the following can happen:

        <pre class="programlisting">\begin{itemize}
\item Some text                         &lt;------- fold will start here
This item will contain a nested item
\begin{itemize}                         &lt;----- fold will end here because next line contains \item...
\item Hello  
\end{itemize}                           &lt;----- ... instead of here.
\item Next item of the parent itemize  
\end{itemize}</pre>

        Therefore, in order to completely define a folding item which
        allows nesting, we need to also define a "skip" pattern.
        <tt class="literal">startskip</tt> and end skip do that.
        Leave '' when there is no nesting.
       </td></tr><tr><td><tt class="literal">endskip</tt></td><td>
        the pattern which defines the end of the "skip" pattern for
        nested folds.
       </td></tr></tbody></table></div><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Example 1</h3><p>
     A syntax fold region for the latex section is defined with the
     following arguments to <tt class="literal">AddSyntaxFoldItem</tt>:
     </p><pre class="programlisting">startpat = "\\section{"
endpat   = "\\section{"
startoff = 0
endoff   = -1
startskip = ''
endskip = ''</pre><p>
     Note that the start and end patterns are thus the same and
     <tt class="literal">endoff</tt> has a negative value to capture the effect
     of a section ending one line before the next starts.
    </p></div><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Example 2</h3><p>
     A syntax fold region for the \itemize environment is:
     </p><pre class="programlisting">startpat = '^\s*\\item',
endpat = '^\s*\\item\|^\s*\\end{\(enumerate\|itemize\|description\)}',
startoff = 0,
endoff = -1,
startskip = '^\s*\\begin{\(enumerate\|itemize\|description\)}',
endskip = '^\s*\\end{\(enumerate\|itemize\|description\)}'</pre><p>
     Note the use of <tt class="literal">startskip</tt> and
     <tt class="literal">endskip</tt> to allow nesting.
    </p></div></div></div><div class="section" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both;"><a id="latex-project"></a>9 Multiple file LaTeX projects</h2></div></div><div></div></div><a id="latex-project-example"></a><p>
   Many LaTeX projects contain multiple source files which are
   <tt class="literal">\include</tt>d from a master file. A typical example of
   this situation is a directory layout such as the following
  </p><p>
   </p><pre class="programlisting">thesis/
    main.tex
    abstract.tex
    intro/
        intro.tex
        figures/
            fig1.eps
            fig2.eps
    chapter1/
        chap1.tex
        figures/
            fig1.eps
    conclusion/
        conclusion.tex
        figures/</pre><p> 
  </p><p>
   In the above case, <tt class="literal">main.tex</tt> will typically look like
  </p><p>
    </p><pre class="programlisting">% file: main.tex
\documentclass{report}
\begin{document}

\input{abstract.tex}
\input{intro/intro.tex}
\input{chapter1/chap1.tex}
\input{conclusion/conclusion.tex}

\end{document}</pre><p>
  </p><p>
   <a id="latex-master-file-specification"></a>
   In such situations, you will need to convey to Latex-Suite that
   <tt class="literal">main.tex</tt> is the main file which
   <tt class="literal">\input</tt>s the other files. This is done by creating a
   file called <tt class="literal">main.tex.latexmain</tt> in the same directory
   in which <tt class="literal">main.tex</tt> resides. This file is called the
   <span class="emphasis"><em>master file</em></span> in this manual. See <a href="#Tex_MainFileExpression">Tex_MainFileExpression</a> for an
   alternative way of specifying the master file.
  </p><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>
    Here <tt class="literal">main.tex.latexmain</tt> is (obviously) a different
    file from <tt class="literal">main.tex</tt> itself.
    <tt class="literal">main.tex</tt> need not be renamed. This ofcourse
    restricts each directory to have a single master file.
   </p></div><p>
   Each time Latex-Suite opens a new LaTeX file, it will try to see if it is
   part of a multiple file project by searching upwards (to the root of
   the file-system) from the current file's directory to see if it finds a
   file of the form <tt class="literal">*.latexmain</tt>. If such a file is
   found, then it is considered that the current file is part of a larger
   project. The name of the LaTeX master file is inferred directly from
   the first part of the <tt class="literal">*.latexmain</tt> file as described
   in the example above.
  </p><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="latex-project-settings"></a>9.1 Latex-Suite project settings</h3></div></div><div></div></div><p>
    If a <a href="#latex-master-file" title="9.2 Specifying which file to compile">master file</a> is found,
    then Latex-Suite <tt class="literal">:source</tt>s the file. Thus this file needs to
    contain valid Vim commands. This file is typically used to store
    project specific settings.
   </p><p>
    Some typical per-project settings which are best put in the master file
    are
    </p><table class="simplelist" summary="Simple list" border="0"><tbody><tr><td><a href="#Tex_ProjectSourceFiles" title="11.5.4 g:Tex_ProjectSourceFiles">Tex_ProjectSourceFiles</a></td></tr></tbody></table><p>
   </p></div><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="latex-master-file"></a>9.2 Specifying which file to compile</h3></div></div><div></div></div><p>
    In the example described <a href="#latex-project-example">previously</a>, if you are editing
    <tt class="literal">intro/intro.tex</tt> and press <tt class="literal">\ll</tt>,
    then you still want Latex-Suite to compile <tt class="literal">main.tex</tt>,
    because <tt class="literal">intro/intro.tex</tt> is merely a fragment which
    is <tt class="literal">\input</tt>'ed into <tt class="literal">main.tex</tt>. If
    the master file is already specified using the
    <tt class="literal">*.latexmain</tt> convention described <a href="#latex-project-example">previously</a>, then Latex-Suite will automatically
    compile the master file when you are editing any of its
    <tt class="literal">\input</tt>'ed fragments. Thus pressing
    <tt class="literal">\ll</tt> while editing <tt class="literal">intro/intro.tex</tt>
    will compile <tt class="literal">main.tex</tt>.
   </p><a id="Tex_MainFileExpression"></a><p>
    If you wish to use some different logic to specify the main file name,
    you can specify a custom expression via the
    <tt class="literal">Tex_MainFileExpression</tt> variable. This is a string
    containing a valid vim expression. In addition, you can use a variable
    <tt class="literal">modifier</tt> which is in the format used for
    <tt class="literal">|filename-modifiers|</tt>, for example,
    <tt class="literal">':p:h'</tt>. You should utilize this variable to modify
    the filename of the main file.
    </p><pre class="programlisting">let g:Tex_MainFileExpression = 'MainFile(modifier)'
function! MainFile(fmod)
    if glob('*.latexmain') != ''
        return fnamemodify(glob('*.latexmain'), a:fmod)
    else
        return ''
    endif
endif</pre><p>
   </p></div></div><div class="section" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both;"><a id="latex-suite-commands-maps"></a>10 Latex-Suite Commands and Maps</h2></div></div><div></div></div><p>
   This section describes the maps and commands used in Latex-Suite. It also
   describes a way to change the map sequences according to your
   preference.
  </p><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="latex-suite-maps"></a>10.1 Latex-Suite Maps</h3></div></div><div></div></div><a id="remapping-latex-suite-keys"></a><p>
    Most of the mappings used in Latex-Suite can be mapped to a different key
    combination to suit your particular needs. An example best explains the
    procedure for doing this. Suppose you want to remap the
    <tt class="literal">&lt;C-j&gt;</tt> key which Latex-Suite (actually imaps.vim) uses
    to jump to the next placeholder. To do this, you first need to find out
    which <tt class="literal">&lt;Plug&gt;</tt> mapping
    <tt class="literal">&lt;C-j&gt;</tt> is derived from. You will need to look
    at the relevant section of this manual to do this. For example, the
    section <a href="#customize-imap-maps" title="10.1.1 IMAP mappings">IMAP mappings</a> has
    the information that the <tt class="literal">&lt;C-j&gt;</tt> key is derived
    from <tt class="literal">&lt;Plug&gt;IMAP_JumpForward</tt>. Therefore to
    remap the <tt class="literal">&lt;C-j&gt;</tt> key to say
    <tt class="literal">&lt;C-space&gt;</tt>, you will need to put a
    statement like the following in your <tt class="literal">~/.vimrc</tt>.
    </p><pre class="programlisting">imap &lt;C-space&gt; &lt;Plug&gt;IMAP_JumpForward</pre><p>
   </p><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>
     To change the <tt class="literal">IMAP</tt> mappings which affect jumping
     between placeholders, the <tt class="literal">map</tt> statement above has
     to be placed in your <tt class="literal">~/.vimrc</tt>. For other mappings
     you can place the <tt class="literal">map</tt> statement in your
     <tt class="literal">$VIM/ftplugin/tex.vim</tt> file.  The reason for this is
     that the <tt class="literal">&lt;C-j&gt;</tt> maps are created in
     <tt class="literal">plugin/imaps.vim</tt>, which is sourced as soon as Vim
     starts before sourcing any ftplugin files.
    </p></div><div class="section" lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="customize-imap-maps"></a>10.1.1 IMAP mappings</h4></div></div><div></div></div><p>
     These mappings are utlilized for jumping between placeholders as
     described <a href="#place-holders">here</a>. See the <a href="#latex-suite-maps" title="10.1 Latex-Suite Maps">parent section</a> to find out how to
     use this information to change the default maps.
    </p><a id="Plug_IMAP_JumpForward"></a><a id="Plug_IMAP_JumpBack"></a><a id="Plug_IMAP_DeleteAndJumpForward"></a><a id="Plug_IMAP_DeleteAndJumBack"></a><div class="informaltable"><table border="1"><colgroup><col><col></colgroup><thead><tr><th>Plug map</th><th>Default Key</th></tr></thead><tbody><tr><td><tt class="literal">&lt;Plug&gt;IMAP_JumpForward</tt></td><td><tt class="literal">&lt;C-j&gt;</tt></td></tr><tr><td><tt class="literal">&lt;Plug&gt;IMAP_JumpBack</tt></td><td>(none)</td></tr><tr><td><tt class="literal">&lt;Plug&gt;IMAP_DeleteAndJumpForward</tt></td><td>(none)</td></tr><tr><td><tt class="literal">&lt;Plug&gt;IMAP_DeleteAndJumpBack</tt></td><td>(none)</td></tr></tbody></table></div><p>
     <tt class="literal">&lt;Plug&gt;IMAP_JumpForward</tt> takes you to the
     location of the next <a href="#place-holders">place-holder</a>.
    </p><p>
     <tt class="literal">&lt;Plug&gt;IMAP_JumpBack</tt> takes you to the previous
     <a href="#place-holders">place-holder</a>.
    </p><p>
     <tt class="literal">&lt;Plug&gt;IMAP_DeleteAndJumpForward</tt> deletes the
     presently selected place-holder and jumps to the next place-holder
     irrespective of whether the present placeholder is empty or not and
     ignoring the value of place-holder settings like <a href="#Imap_DeleteEmptyPlaceHolders" title="11.2.3 g:Imap_DeleteEmptyPlaceHolders"><tt class="literal">g:Imap_DeleteEmptyPlaceHolders</tt></a>
     and <a href="#Imap_StickyPlaceHolders" title="11.2.4 g:Imap_StickyPlaceHolders"><tt class="literal">g:Imap_StickyPlaceHolders</tt></a>
    </p><p>
     <tt class="literal">&lt;Plug&gt;IMAP_DeleteAndJumpBack</tt> deletes the
     presently selected place-holder and jumps to the previous place-holder
     irrespective of whether the present placeholder is empty or not and
     ignoring the value of place-holder settings like <a href="#Imap_DeleteEmptyPlaceHolders" title="11.2.3 g:Imap_DeleteEmptyPlaceHolders"><tt class="literal">g:Imap_DeleteEmptyPlaceHolders</tt></a>
     and <a href="#Imap_StickyPlaceHolders" title="11.2.4 g:Imap_StickyPlaceHolders"><tt class="literal">g:Imap_StickyPlaceHolders</tt></a>
    </p></div><div class="section" lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="customize-alt-key-maps"></a>10.1.2 Alt-Key mappings</h4></div></div><div></div></div><p>
     These mappings are are described in the section <a href="#altkey-mappings" title="3.10 Alt Key Macros">Alt key macros</a>. See <a href="#remapping-latex-suite-keys">the parent section</a> to see
     how to use the following information to remap keys.
    </p><a id="Plug_Tex_MathBF"></a><a id="Plug_Tex_MathCal"></a><a id="Plug_Tex_LeftRight"></a><a id="Plug_Tex_InsertItem"></a><div class="informaltable"><table border="1"><colgroup><col><col></colgroup><thead><tr><th>Plug Mapping</th><th>Default Key</th></tr></thead><tbody><tr><td><tt class="literal">&lt;Plug&gt;Tex_MathBF</tt></td><td><tt class="literal">&lt;Alt-B&gt;</tt></td></tr><tr><td><tt class="literal">&lt;Plug&gt;Tex_MathCal</tt></td><td><tt class="literal">&lt;Alt-C&gt;</tt></td></tr><tr><td><tt class="literal">&lt;Plug&gt;Tex_LeftRight</tt></td><td><tt class="literal">&lt;Alt-L&gt;</tt></td></tr><tr><td><tt class="literal">&lt;Plug&gt;Tex_InsertItem</tt></td><td><tt class="literal">&lt;Alt-I&gt;</tt></td></tr></tbody></table></div></div></div><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="latex-suite-commands"></a>10.2 Latex Suite Commands</h3></div></div><div></div></div><div class="section" lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="TMacro"></a>10.2.1 :TMacro [{macro}]</h4></div></div><div></div></div><p>
    When used without any arguments lists all available macros defined
    in runtime ftplugin/latex-suite/macros/ directories and prompts you
    to choose one of them. With one argument |:read| this macro under
    cursor position. With more than one argument it will not work :) In
    Vim &gt;= 6.2 works completion of names of macros (see 'wildmenu',
    'wildmode' for more about command-line completion).
    </p></div><div class="section" lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="TMacroEdit"></a>10.2.2 :TMacroEdit [{macro}]</h4></div></div><div></div></div><p>
    Splits window for editing {macro}. When used without any arguments
    lists all available macros defined in runtime
    ftplugin/latex-suite/macros/ directories and prompt you to choose
    one of them.  When you try to edit {macro} not from local directory
    Latex-Suite will copy it to your local directory with suffix
    "-local". If local copy already exists Latex-Suite prompt for
    overwriting it.  In Vim &gt;= 6.2 works completion of names of macros
    (see 'wildmenu', 'wildmode' for more about command-line completion).
    </p></div><div class="section" lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="TMacroNew"></a>10.2.3 :TMacroNew</h4></div></div><div></div></div><p>
     Splits window to write new macro. Directory in new buffer is
     locally changed to Latex-Suite/macros/.
    </p></div><div class="section" lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="TMacroDelete"></a>10.2.4 :TMacroDelete [{macro}]</h4></div></div><div></div></div><p>
    Delets {macro} from your local ftplugin/latex-suite/macros/
    directory.  When used without any arguments lists all available
    macros defined in Latex-Suite/macros/ directory and prompt you to
    choose one of them.  When you choose to delete {macro} which is not
    in your local directory Latex-Suite will refuse to delete it.  In
    Vim &gt;= 6.2 works completion of names of macros (see 'wildmenu',
    'wildmode' for more about command-line completion)
    </p></div><div class="section" lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="TPackage"></a>10.2.5 :TPackage [{package, ...}]</h4></div></div><div></div></div><p>
     When used without any arguments lists name of the packages for
     which support is available. If you are using Vim GUI and have
     <tt class="literal">Tex_Menus</tt> set to 1, then it will list all files
     found in the <tt class="literal">$VIM/ftplugin/latex-suite/packages</tt>
     directory. Otherwise, Latex-Suite will list files found in the
     <tt class="literal">$VIM/ftplugin/latex-suite/dicrionaries</tt> directory.
     Choosing a file from the list will insert a
     </p><pre class="programlisting">\usepackage[&lt;++&gt;]{&lt;packname&gt;}</pre><p> line into the
     buffer at the current cursor location. For Vim 6.2 and above, you
     can use command-line completion to choose a package file. You can also
     call <tt class="literal">TPackage</tt> with one or more package names
     seperated with spaces in which case, Latex-Suite will insert
     <tt class="literal">\usepackage</tt> lines for each of them in turn.
    </p><p>
     After inserting the <tt class="literal">\usepackage</tt> line(s), Latex-Suite will
     support it (them) in various ways as described in the section <a href="#package-actions" title="4.2 Actions taken for supported packages">Actions taken for supported
      packages</a>.
    </p></div><div class="section" lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="TPackageUpdate"></a>10.2.6 :TPackageUpdate</h4></div></div><div></div></div><p>
     This command `reads' name of package under cursor and turns on
     possible support.
    </p></div><div class="section" lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="TPackageUpdateAll"></a>10.2.7 :TPackageUpdateAll</h4></div></div><div></div></div><p>
     After issuing this command latexSuite scans the file in
     looking for not declared packages, removing not needed entries
     from Packages menu and turning off not necessary packages'
     dictionaries.
    </p></div><div class="section" lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="TTemplate"></a>10.2.8 :TTemplate [{template}]</h4></div></div><div></div></div><p>
     When used without any arguments lists all available templates
     from latex-suite/templates/ directory and prompts to choose
     one of them.
     With one argument :0|read| {template} file.
     With more than one argument it will not work :)
     In Vim &gt;= 6.2 works completion of names of macros (see 'wildmenu',
     'wildmode' for more about command-line completion)
    </p></div><div class="section" lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="TSection"></a>10.2.9 :TSection [{argument}]</h4></div></div><div></div></div><p>
     Used without any arguments inserts last section type
     (|latex-sectioning|).
     Accepts arguments:
     n&gt;     inserts section name in &lt;n&gt; logical level.
     Levels are:
     </p><div class="informaltable"><table border="1"><colgroup><col><col></colgroup><tbody><tr><td>0</td><td>part</td></tr><tr><td>1</td><td>chapter</td></tr><tr><td>2</td><td>section</td></tr><tr><td>3</td><td>subsection</td></tr><tr><td>4</td><td>subsubsection</td></tr><tr><td>5</td><td>paragraph</td></tr><tr><td>6</td><td>subparagraph</td></tr></tbody></table></div><p>

     </p><div class="informaltable"><table border="1"><colgroup><col><col></colgroup><tbody><tr><td>
          +&lt;n&gt;    
         </td><td>
          inserts section name &lt;n&gt; logical levels above the last
          used comand
         </td></tr><tr><td>
          -&lt;n&gt;    
         </td><td>
          inserts section name &lt;n&gt; logical levels below the last
          used comand
         </td></tr><tr><td>
          +       
         </td><td>
          inserts section name one logical level below the last
          used command (equal to +1).
         </td></tr><tr><td>
          ++      
         </td><td>
          inserts section name two logical levels below the last
          used command (equal to +2).
         </td></tr><tr><td>
          -       
         </td><td>
          inserts section name one logical level over the last
          used command (equal to -1).
         </td></tr><tr><td>
          --      
         </td><td>
          inserts section name two logical levels over the last
          used command (equal to -2).
         </td></tr></tbody></table></div><p>

     Command accepts also latexSuite mappings (|latex-macros|)
     without preceding S and in lowercase:
     </p><pre class="programlisting">:TSection pa</pre><p>
     will result in <tt class="literal">\part{}</tt>. It is possible to use full names of
     sections: <tt class="literal">:TSection part</tt>
    </p></div><div class="section" lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="TSectionAdvanced"></a>10.2.10 :TSectionAdvanced</h4></div></div><div></div></div><p>
     Accepts the same arguments as |TSection| but leads to a couple
     of questions (whether you want to include the section in the
     table of contents, whether there is a shorter name for the
     table of contents) and then creates a more intelligent
     template.
    </p></div><div class="section" lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="TLook"></a>10.2.11 :TLook</h4></div></div><div></div></div><p>
     Accepts one argument. Will look through .tex files in
     directory of edited file for argument. It can be regexp. You
     don't have to enclose argument in "". &lt;cr&gt; takes you to
     location. Other keys work as described in |latex-viewer|.
     Note: TLook uses :grep command and is using 'grepprg'. Its
     regular expressions can be different from those of Vim.
    </p></div><div class="section" lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="TLookBib"></a>10.2.12 :TLookBib</h4></div></div><div></div></div><p>
     Accepts one argument. Will look through .bib files in
     directory of edited file for argument. It can be regexp. You
     don't have to enclose argument in "". &lt;cr&gt; takes you to
     location. Other keys work as described in |latex-viewer|.
    </p><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>
      TLookBib uses :grep command and is using 'grepprg'.  Its
      regular expressions can be different from those of Vim.
     </p></div></div><div class="section" lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="TLookAll"></a>10.2.13 :TLookAll</h4></div></div><div></div></div><p>
     Accepts one argument. Will look through all files in directory
     of edited file for argument. It can be regexp. You don't have
     to enclose argument in "". &lt;cr&gt; takes you to location. Other
     keys work as described in |latex-viewer|.
     Note: TLook uses :grep command and is using 'grepprg'.  Its
     regular expressions can be different from those of Vim.
    </p></div><div class="section" lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="TPartComp"></a>10.2.14 :TPartComp</h4></div></div><div></div></div><p>
     No argument allowed but accepts range in all formats. Define
     fragment of interest with :'a,'b, :/a/,/b/, :'&lt;,'&gt; or :20,30.
     All other rules of compilation apply.
    </p></div><div class="section" lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="TPartView"></a>10.2.15 :TPartView</h4></div></div><div></div></div><p>
     Show last compiled fragment. All rules of viewing apply but
     |latex-searching|.
    </p></div><div class="section" lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="Tshortcuts"></a>10.2.16 :Tshortcuts [{arg}]</h4></div></div><div></div></div><p>
     Show shortcuts in terminal (not using menu). Without {arg}
     you will see simple menu prompting for one of them. Possible
     arguments:
     </p><div class="informaltable"><table border="0"><colgroup><col><col></colgroup><tbody><tr><td>g</td><td>General shortcuts</td></tr><tr><td>e</td><td>Environment shortcuts</td></tr><tr><td>f</td><td>Font shortcuts</td></tr><tr><td>s</td><td>Section shortcuts</td></tr><tr><td>m</td><td>Math shortcuts</td></tr><tr><td>a</td><td>All shortcuts</td></tr></tbody></table></div><p>
    </p></div></div></div><div class="section" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both;"><a id="customizing-latex-suite"></a>11 Customizing Latex-Suite</h2></div></div><div></div></div><p>
   Customizing Latex-Suite is done by defining certain global variables in
   <tt class="literal">$VIM/ftplugin/tex.vim</tt>, where
   <tt class="literal">$VIM</tt> corresponds to <tt class="literal">~/.vim</tt> for *nix
   machines and <tt class="literal">~/vimfiles</tt> for windows machines. This file
   is not part of the Latex-Suite distribution. You will need to create this file
   yourself (or modify it if it exists) if
   you need to change any default settinngs. Since this file is not
   included as part of the Latex-Suite distribution, it will not be over-written in
   subsequent updates.
  </p><p>
   The default settings in Latex-Suite are defined in
   <tt class="literal">$VIM/ftplugin/latex-suite/texrc</tt>. Please take a look at
   this file if you find this documentation incomplete or confusing. That file
   is also well documented.
  </p><p>
   This chapter describes the various settings which effect Latex-Suite and their
   default values. The settings are broken up into sections according to the
   behavior which they influence. 
  </p><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="ls-general-purpose-settings"></a>11.1 General Settings</h3></div></div><div></div></div><div class="section" lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="Tex_Debug"></a>11.1.1 Tex_Debug</h4></div></div><div></div></div><p>
     </p><div class="informaltable"><table border="1"><colgroup><col><col></colgroup><tbody><tr><td>Type</td><td>boolean</td></tr><tr><td>Default Value</td><td><tt class="literal">0</tt></td></tr></tbody></table></div><p>
     </p><p>
      If set to 1, then Latex-Suite will create certain global debug
      statements which can be printed by doing
      </p><pre class="programlisting">:call Tex_PrintDebug()</pre><p>
     </p><p>
    </p></div><div class="section" lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="Tex_UsePython"></a>11.1.2 Tex_UsePython</h4></div></div><div></div></div><p>
     </p><div class="informaltable"><table border="1"><colgroup><col><col></colgroup><tbody><tr><td>Type</td><td>boolean</td></tr><tr><td>Default Value</td><td><tt class="literal">1</tt></td></tr></tbody></table></div><p>
     </p><p>
      If Latex-Suite detects that your vim is python enabled (using
      <tt class="literal">has('python')</tt>), then it tries to use python in
      certain places to speed things up. If this misbehaves, you can set
      this to zero, in which case, Latex-Suite will use vimscript to accomplish
      the same.
     </p><p>
    </p></div></div><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="customizing-place-holders"></a>11.2 Place-Holder Customization</h3></div></div><div></div></div><p>
    Latex-Suite uses <a href="#place-holders">place-holders</a> to minimize
    using the movement keys while typing. The following settings affect how
    place-holders are used.
   </p><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>
     These setting need to be set in your <tt class="literal">~/.vimrc</tt>, not
     <tt class="literal">$VIM/ftplugin/tex.vim</tt> because these settings affect
     the behavior of <tt class="literal">imaps.vim</tt>, which is a global plugin,
     not a file-type plugin.
    </p></div><div class="section" lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="Imap_UsePlaceHolders"></a>11.2.1 g:Imap_UsePlaceHolders</h4></div></div><div></div></div><div class="informaltable"><table border="1"><colgroup><col><col></colgroup><tbody><tr><td>Type</td><td>Boolean</td></tr><tr><td>Default Value</td><td><tt class="literal">1</tt></td></tr></tbody></table></div><p>
     Setting this to zero completeley disables using place-holders.
    </p></div><div class="section" lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="Imap_PlaceHolderStart"></a>11.2.2 g:Imap_PlaceHolderStart &amp; g:Imap_PlaceHolderEnd</h4></div></div><div></div></div><a id="Imap_PlaceHolderEnd"></a><div class="informaltable"><table border="1"><colgroup><col><col><col></colgroup><thead><tr><th>Setting</th><th>Type</th><th>Value</th></tr></thead><tbody><tr><td><tt class="literal">Imap_PlaceHolderStart</tt></td><td>String</td><td><tt class="literal">'&lt;+'</tt></td></tr><tr><td><tt class="literal">Imap_PlaceHolderEnd</tt></td><td>String</td><td><tt class="literal">'+&gt;'</tt></td></tr></tbody></table></div><p>
     These settings affect the strings displayed at the beginning and end of
     the place-holder string. Set these strings to a value different than a
     commonly ocurring sequence of characters. 
    </p><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">TIP</h3><p>
      If you use the <tt class="literal">latin1</tt> encoding and do not type in
      french, then you can set these strings to the <tt class="literal">\xab</tt>
      and <tt class="literal">\xbb</tt> characters (the french quotation marks).
     </p></div></div><div class="section" lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="Imap_DeleteEmptyPlaceHolders"></a>11.2.3 g:Imap_DeleteEmptyPlaceHolders</h4></div></div><div></div></div><div class="informaltable"><table border="1"><colgroup><col><col></colgroup><tbody><tr><td>Type</td><td>Boolean</td></tr><tr><td>Default Value</td><td><tt class="literal">1</tt></td></tr></tbody></table></div><p>
     When set to one, non-descriptive or empty place-holders are deleted on
     pressing <tt class="literal">&lt;Ctrl-J&gt;</tt>.
    </p></div><div class="section" lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="Imap_StickyPlaceHolders"></a>11.2.4 g:Imap_StickyPlaceHolders</h4></div></div><div></div></div><div class="informaltable"><table border="1"><colgroup><col><col></colgroup><tbody><tr><td>Type</td><td>Boolean</td></tr><tr><td>Default Value</td><td><tt class="literal">1</tt></td></tr></tbody></table></div><p>
     When set to 1, in visual mode, <tt class="literal">&lt;Ctrl-J&gt;</tt> takes
     you to the next placeholder without deleting the current placeholder.
    </p></div></div><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="customizing-macros"></a>11.3 Macro Customization</h3></div></div><div></div></div><div class="section" lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="Tex_Env_name"></a>11.3.1 Tex_Env_name</h4></div></div><div></div></div><p>
      If you wish to wish to expand certain environments differently from
      the way Latex-Suite does it, you can define custom expansions using global
      variables of the form <tt class="literal">Tex_Env_{name}</tt> where
      <tt class="literal">name</tt> corresponds to the environment.
     </p><p>
      For example, if you press <tt class="literal">&lt;F5&gt;</tt> after typing
      <tt class="literal">theorem</tt>, Latex-Suite will by default expand it to
      </p><pre class="programlisting">\begin{theorem}
     \label{&lt;++&gt;}&lt;++&gt;
\end{theorem}&lt;++&gt;</pre><p>
       However, if you wish change this to
      </p><pre class="programlisting">\begin{theorem}
     &lt;++&gt;
\end{theorem}&lt;++&gt;</pre><p>
       then define the following variable
      </p><pre class="programlisting">let g:Tex_Env_theorem = "\\begin{theorem}\&lt;CR&gt;&lt;++&gt;\&lt;CR&gt;\\end{theorem}"</pre><p>
      </p><p>
      If the expaniosn uses special keys such as carriage return etc, then
      use double-quotes and use the <tt class="literal">"\&lt;key&gt;"</tt>
      notation for special keys. Backslashes have to be doubled.
     </p><p>
      You could even use strings returned by functions as the expansion by
      using the <a href="#IMAP_PutTextWithMovement">IMAP_PutTextWithMovement()</a>
      function.
     </p><p>
      If the name of the environment contains special characters (for
      example, the <tt class="literal">eqnarray*</tt> environment), then use the
      following form:
      </p><pre class="programlisting">let g:Tex_Env_{'eqnarray*'} = 
        \ "\\begin{eqnarray*}\&lt;CR&gt;&lt;++&gt; &amp;=&amp; &lt;++&gt;\&lt;CR&gt;\\end{eqnarray*}&lt;++&gt;"</pre><p>
       This will make pressing <tt class="literal">&lt;F5&gt;</tt> after
       <tt class="literal">eqnarray*</tt> expand to
       </p><pre class="programlisting">\begin{eqnarray*}
    &lt;++&gt; &amp;=&amp; &lt;++&gt;
\end{eqnarray*}&lt;++&gt;</pre><p>
     </p></div><div class="section" lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="Tex_Com_name"></a>11.3.2 Tex_Com_name</h4></div></div><div></div></div><p>
     If you wish to define new expansions for fast command insertion as
     described <a href="#latex-command-maps" title="3.2 Command Mappings">here</a>, or redefine
     expansios from the default values in Latex-Suite, you will need to define
     variables of the form <tt class="literal">g:Tex_Com_{name}</tt> where
     <tt class="literal">name</tt> is a command name. For example, with the
     setting
     </p><pre class="programlisting">let g:Tex_Com_frac = "\\frac{&lt;++&gt;}{&lt;++&gt;}&lt;++&gt;"</pre><p>
     pressing <tt class="literal">&lt;F7&gt;</tt> after typing
     <tt class="literal">frac</tt> will change it to <tt class="literal">\frac{&lt;++&gt;}{&lt;++&gt;}&lt;++&gt;</tt>
    </p><p>
     See <a href="#Tex_Env_name" title="11.3.1 Tex_Env_name">Tex_Env_name</a> for additional
     details on how to create this setting in various special
     circumstances.
    </p></div><div class="section" lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="macro-enabling"></a>11.3.3 Enabling / disabling macros</h4></div></div><div></div></div><p>
     The following variables disable various parts of the macro functionality
     of Latex-Suite. See the links to the relevant sections to see what functionality
     setting each of the variables to zero will take away.
    </p><a id="Tex_EnvironmentMaps"></a><a id="Tex_EnvironmentMenus"></a><a id="Tex_FontMaps"></a><a id="Tex_FontMenus"></a><a id="Tex_SectionMaps"></a><a id="Tex_SectionMenus"></a><div class="informaltable"><table border="1"><colgroup><col><col><col></colgroup><thead><tr><th>Setting</th><th>Link to relevant section</th><th>Default Value</th></tr></thead><tbody><tr><td><tt class="literal">g:Tex_EnvironmentMaps
       </tt></td><td><a href="#environment-mappings" title="3.1 Environment Mappings">Environment Mappings</a></td><td>1</td></tr><tr><td><tt class="literal">g:Tex_EnvironmentMenus</tt></td><td>&nbsp;</td><td>1</td></tr><tr><td><tt class="literal">g:Tex_FontMaps        </tt></td><td><a href="#font-maps" title="3.3 Font Mappings">Font Mappings</a></td><td>1</td></tr><tr><td><tt class="literal">g:Tex_FontMenus       </tt></td><td>&nbsp;</td><td>1</td></tr><tr><td><tt class="literal">g:Tex_SectionMaps     </tt></td><td><a href="#section-mappings" title="3.4 Section Mappings">Section Mappings</a></td><td>1</td></tr><tr><td><tt class="literal">g:Tex_SectionMenus    </tt></td><td>&nbsp;</td><td>1</td></tr></tbody></table></div></div><div class="section" lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="Tex_UseMenuWizard"></a>11.3.4 g:Tex_UseMenuWizard</h4></div></div><div></div></div><div class="informaltable"><table border="1"><colgroup><col><col></colgroup><tbody><tr><td>Type</td><td>Boolean</td></tr><tr><td>Default Value</td><td><tt class="literal">0</tt></td></tr></tbody></table></div><p>
     If this variable is set to 1, then when an enviroment is chosen from the
     menu then for selected environments, Latex-Suite asks a series of
     questions on the command line and inserts a template with the
     corresponding fields already filled in.  Setting this to zero will insert
     a template with <a href="#place-holders">place-holders</a>
     marking off the places where fields need to be filled.
    </p></div><div class="section" lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="Imap_FreezeImap"></a>11.3.5 g:Imap_FreezeImap</h4></div></div><div></div></div><p>
     </p><div class="informaltable"><table border="1"><colgroup><col><col></colgroup><tbody><tr><td>Type</td><td>boolean</td></tr><tr><td>Default Value</td><td><tt class="literal">0</tt></td></tr></tbody></table></div><p>
     </p><p>
      This option when set to 1, temporarily freezes Latex-Suite's macro
      expansion. It might be useful when you are using some other keymap
      which is causing excessive macro expansion. Use a buffer-local
      variable of the same name if you wish to affect just the present
      buffer. 
     </p><p>
    </p></div><div class="section" lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="Tex_CatchVisMapErrors"></a>11.3.6 g:Tex_CatchVisMapErrors</h4></div></div><div></div></div><div class="informaltable"><table border="1"><colgroup><col><col></colgroup><tbody><tr><td>Type</td><td>Boolean</td></tr><tr><td>Default Value</td><td><tt class="literal">1</tt></td></tr></tbody></table></div><p>
     With so many visual maps, its helpful to have a way of catching typing
     errors made in visual mode. What this does is to prompt you to correct
     your visual mode mapping if you start out with <tt class="literal"><a href="#Tex_Leader" title="11.3.8 g:Tex_Leader">g:Tex_Leader</a></tt> and then type some
     illegal keys. It basically maps just the <tt class="literal">g:Tex_Leader</tt>
     character to a function.
    </p></div><div class="section" lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="Tex_Diacritics"></a>11.3.7 g:Tex_Diacritics</h4></div></div><div></div></div><div class="informaltable"><table border="1"><colgroup><col><col></colgroup><tbody><tr><td>Type</td><td>Boolean</td></tr><tr><td>Default Value</td><td><tt class="literal">0</tt></td></tr></tbody></table></div><p>
     Whether or not you want to use <a href="#diacritic-mappings" title="3.7 Diacritics">diacritics</a>.
    </p></div><div class="section" lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="Tex_Leader"></a>11.3.8 g:Tex_Leader</h4></div></div><div></div></div><div class="informaltable"><table border="1"><colgroup><col><col></colgroup><tbody><tr><td>Type</td><td>String</td></tr><tr><td>Default Value</td><td><tt class="literal">'`'</tt></td></tr></tbody></table></div><p>
     The mappings in Latex-Suite are by default prefixed with the back-tick
     character. For example, <tt class="literal">`/</tt> inserts
     <tt class="literal">\frac{&lt;++&gt;}{&lt;++&gt;}&lt;++&gt;</tt> etc. You can change the
     prefix with the following setting.
     <tt class="literal">','</tt>, <tt class="literal">'/'</tt>,
     <tt class="literal">'`'</tt> are preferred values. <tt class="literal">''</tt> or
     <tt class="literal">'\'</tt> will lead to a <span class="emphasis"><em>lot</em></span> of
     trouble.
    </p><p>
     g:Tex_Leader is also used for visual mode mappings for fonts.
    </p></div><div class="section" lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="Tex_Leader2"></a>11.3.9 g:Tex_Leader2</h4></div></div><div></div></div><div class="informaltable"><table border="1"><colgroup><col><col></colgroup><tbody><tr><td>Type</td><td>String</td></tr><tr><td>Default Value</td><td><tt class="literal">','</tt></td></tr></tbody></table></div><p>
     In order to avoid clashes between the large number of visual mode macros
     provided, the <a href="#enclosing-env-threeletter" title="3.1.2.2 Method 2: Using three letter mappings">visual mode
      macros for environments</a> and sections start with a character
     different from <tt class="literal">g:Tex_Leader</tt>.
    </p></div><div class="section" lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="Tex_PromptedEnvironments"></a>11.3.10 g:Tex_PromptedEnvironments</h4></div></div><div></div></div><div class="informaltable"><table border="1"><colgroup><col><col></colgroup><tbody><tr><td>Type</td><td>String</td></tr><tr><td>Default Value</td><td><tt class="literal">'eqnarray*,eqnarray,equation,equation*,\[,$$,align,align*'</tt></td></tr></tbody></table></div><p>
     This string represents a comma seperated list of fields corresponding to
     environments. Pressing <tt class="literal">&lt;F5&gt;</tt> in insert-mode in
     the body of the document asks you to choose from one of these
     environments to insert.
    </p><p>
     Leaving this string empty will leave the <tt class="literal">&lt;F5&gt;</tt>
     key unmapped
    </p></div><div class="section" lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="Tex_HotKeyMappings"></a>11.3.11 g:Tex_HotKeyMappings</h4></div></div><div></div></div><div class="informaltable"><table border="1"><colgroup><col><col></colgroup><tbody><tr><td>Type</td><td>String</td></tr><tr><td>Default Value</td><td><tt class="literal">'eqnarray*,eqnarray,bmatrix'</tt></td></tr></tbody></table></div><p>
     This string represents a comma seperated list of environments which are
     mapped to <tt class="literal">&lt;Shift-F-1&gt;</tt> through
     <tt class="literal">&lt;Shift-F-4&gt;</tt>. For example, pressing
     <tt class="literal">&lt;Shift-F-2&gt;</tt> with this setting inserts the
     <tt class="literal">eqnarray</tt> environment.
    </p><p>
     Leaving this string empty will leave <tt class="literal">&lt;Shift-F-1&gt;</tt> through
     <tt class="literal">&lt;Shift-F-4&gt;</tt> unmapped.
    </p><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>
      Only the first four fields of this list are used. The rest are silently
      ignored.
     </p></div></div><div class="section" lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="Tex_PromptedCommands"></a>11.3.12 g:Tex_PromptedCommands</h4></div></div><div></div></div><div class="informaltable"><table border="1"><colgroup><col><col></colgroup><tbody><tr><td>Type</td><td>String</td></tr><tr><td>Default Value</td><td><tt class="literal">'footnote,cite,pageref,label'</tt></td></tr></tbody></table></div><p>
     This string represents a comma seperated list of LaTeX commands
     which Latex-Suite uses for the <tt class="literal">&lt;F7&gt;</tt> and
     <tt class="literal">&lt;S-F7&gt;</tt> maps as described <a href="#latex-command-maps" title="3.2 Command Mappings">here</a>.
    </p><p>
     Leaving this string empty will leave the <tt class="literal">&lt;F7&gt;</tt>
     key unmapped.
    </p></div><div class="section" lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="Tex_ItemStyle_environment"></a>11.3.13 Tex_ItemStyle_environment</h4></div></div><div></div></div><p>
     This setting affects the style which Latex-Suite uses to insert an
     <tt class="literal">\item</tt> when <tt class="literal">&lt;Alt-I&gt;</tt> is
     pressed as described <a href="#Alt-I" title="3.10.4 &lt;Alt-I&gt;">here</a>. By default
     Latex-Suite defines styles for the following environments:
    </p><div class="informaltable"><table border="1"><colgroup><col><col></colgroup><thead><tr><th>Environment</th><th>Style</th></tr></thead><tbody><tr><td>itemize</td><td>\item </td></tr><tr><td>enumerate</td><td>\item </td></tr><tr><td>theindex</td><td>\item </td></tr><tr><td>thebibliography</td><td>\item[&lt;+biblabel+&gt;]{&lt;+bibkey+&gt;} &lt;++&gt;</td></tr><tr><td>description</td><td>\item[&lt;+label+&gt;] &lt;++&gt;</td></tr></tbody></table></div><p>
     Each style is defined by a variable of the form
     <tt class="literal">g:Tex_ItemStyle_{envname}</tt> where
     <tt class="literal">envname</tt> is the name of the environment for which
     the style is defined. For example, by default
     </p><pre class="programlisting">g:Tex_ItemStyle_description = '\item[&lt;+label+&gt;] &lt;++&gt;'</pre><p>
     Redefining the style for a particular environment or defining a style
     for an entirely new environment is simply a matter of setting the
     value of a variable of the corresponding name.
    </p></div></div><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="customizing-smart-keys"></a>11.4 Smart Key Customization</h3></div></div><div></div></div><p>
    These settings affect the smart key functionality as described <a href="#smart-keys" title="3.9 Smart Key Mappings">here</a>.
   </p><div class="section" lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="Tex_SmartKeyBS"></a>11.4.1 g:Tex_SmartKeyBS</h4></div></div><div></div></div><div class="informaltable"><table border="1"><colgroup><col><col></colgroup><tbody><tr><td>Type</td><td>Boolean</td></tr><tr><td>Default Value</td><td><tt class="literal">1</tt></td></tr></tbody></table></div><p>
     Whether or not <tt class="literal">&lt;Backspace&gt;</tt> deletes diacritics.
    </p></div><div class="section" lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="Tex_SmartKeyQuote"></a>11.4.2 g:Tex_SmartKeyQuote</h4></div></div><div></div></div><div class="informaltable"><table border="1"><colgroup><col><col></colgroup><tbody><tr><td>Type</td><td>Boolean</td></tr><tr><td>Default Value</td><td><tt class="literal">1</tt></td></tr></tbody></table></div><p>
     Whether or not the <a href="#smart-keys" title="3.9 Smart Key Mappings">smart quotes</a>
     functionality is available.
    </p><p>
     If enabled, the quote characters can be customized by setting the
     following variables:
    </p><div class="informaltable"><table border="1"><colgroup><col><col></colgroup><thead><tr><th>Setting</th><th>Value</th></tr></thead><tbody><tr><td><tt class="literal">g:Tex_SmartQuoteOpen</tt></td><td><tt class="literal">"``"</tt></td></tr><tr><td><tt class="literal">g:Tex_SmartQuoteClose</tt></td><td><tt class="literal">"''"</tt></td></tr></tbody></table></div><p>
     Non-english users will want to change these settings to their locale.
     These global variables will be ignored if there are buffer-local
     variables (with the same name), which may be set in the language specific
     package files, such as
     <tt class="literal">$VIM/ftplugin/latex-suite/packages/german</tt>.
    </p></div></div><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="customizing-latex-completion"></a>11.5 Latex Completion Customization</h3></div></div><div></div></div><p>
    The following settings affect the <a href="#latex-completion" title="5 Latex Completion">
     completion</a> functionality in Latex-Suite.
   </p><div class="section" lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="completion-window-preferences"></a>11.5.1 Window size settings</h4></div></div><div></div></div><p>
     These three settings affect the aesthetics of the completion
     functionality.
    </p><a id="Tex_ViewerCwindowHeight"></a><a id="Tex_ViewerPreviewHeight"></a><a id="Tex_ExplorerHeight"></a><a id="Tex_ImageDir"></a><div class="informaltable"><table border="1"><colgroup><col><col><col></colgroup><thead><tr><th>Setting</th><th>Explanation</th><th>Default Value</th></tr></thead><tbody><tr><td><tt class="literal">g:Tex_ViewerCwindowHeight</tt></td><td>The height of the <tt class="literal">cwindow</tt> which displays the
         list of <tt class="literal">\label</tt>s etc.</td><td>5</td></tr><tr><td><tt class="literal">g:Tex_ViewerPreviewHeight</tt></td><td>The height of the preview window which shows the context of a
         <tt class="literal">\label</tt> etc.</td><td>10 </td></tr><tr><td><tt class="literal">g:Tex_ExplorerHeight</tt></td><td>The height of the explorer window which lists the files from
         which to choose an image file.</td><td>10</td></tr><tr><td><tt class="literal">g:Tex_ImageDir</tt></td><td>The directory to scan for images</td><td>''</td></tr></tbody></table></div></div><div class="section" lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="Tex_BIBINPUTS"></a>11.5.2 g:Tex_BIBINPUTS</h4></div></div><div></div></div><div class="informaltable"><table border="1"><colgroup><col><col></colgroup><tbody><tr><td>Type</td><td>string</td></tr><tr><td>Default Value</td><td><tt class="literal">''</tt></td></tr></tbody></table></div><p>
     This string describes the directories which are scanned while trying
     to search for <tt class="literal">.bib</tt> and <tt class="literal">.bbl</tt>
     files.  See the <a href="#latex-completion-cite" title="5.3 Latex-Suite \cite completion">cite completion
      section</a> for more details.
    </p><p>
     This string should be set in the syntax accepted by Vim's native
     <tt class="literal">'path'</tt> setting. Do not include the present
     directory <tt class="literal">'.'</tt>. While searching for
     <tt class="literal">bibliography</tt> files, the present directory will be
     prepended to this variable.
    </p></div><div class="section" lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="Tex_UseSimpleLabelSearch"></a>11.5.3 Tex_UseSimpleLabelSearch</h4></div></div><div></div></div><p>
     When set to 1, Latex-Suite searches for <tt class="literal">\label</tt>s in all
     <tt class="literal">.tex</tt> files in the directory containing the file
     being edited when &lt;F9&gt; is pressed. See <a href="#ls-completion-ref" title="5.2 Latex-Suite \ref completion">\ref completion</a> for details.
    </p></div><div class="section" lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="Tex_ProjectSourceFiles"></a>11.5.4 g:Tex_ProjectSourceFiles</h4></div></div><div></div></div><div class="informaltable"><table border="1"><colgroup><col><col></colgroup><tbody><tr><td>Type</td><td>String</td></tr><tr><td>Default Value</td><td><tt class="literal">''</tt></td></tr></tbody></table></div><p>
     This setting is meant to be initialized on a per-project basis using
     the <a href="#latex-master-file" title="9.2 Specifying which file to compile">Latex-Suite master file</a> as
     described in <a href="#latex-project" title="9 Multiple file LaTeX projects">Latex-Suite Project</a>
     section. It is a list of source files which are used in the project.
     If defined, then instead of using the logic described in 
     <a href="#Tex_UseSimpleLabelSearch" title="11.5.3 Tex_UseSimpleLabelSearch">Tex_UseSimpleLabelSearch</a> to
     search for files in which to search for <tt class="literal">\label</tt>s, we
     simply search for <tt class="literal">\label</tt>s in this list. This
     significantly reduces the time it takes to generate the list of
     possible completions for large projects.
    </p><p>
     The list is specified as a whitespace seperated list of filenames
     relative to the location of the main file.
    </p></div><div class="section" lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="Tex_RememberCiteSearch"></a>11.5.5 g:Tex_RememberCiteSearch</h4></div></div><div></div></div><div class="informaltable"><table border="1"><colgroup><col><col></colgroup><tbody><tr><td>Type</td><td>Boolean</td></tr><tr><td>Default Value</td><td><tt class="literal">0</tt></td></tr></tbody></table></div><p>
     When this variable is non-zero, then Latex-Suite will try to remember results
     from the <tt class="literal">\cite</tt> completion as described in <a href="#cite-search-caching" title="5.3.1 Caching the \cite completion results">this section</a>.
    </p></div></div><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="customizing-compiling"></a>11.6 Compiler Customization</h3></div></div><div></div></div><p>
    The following settings affect Latex-Suite's compilation functionality
   </p><div class="section" lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="Tex_DefaultTargetFormat"></a>11.6.1 g:Tex_DefaultTargetFormat</h4></div></div><div></div></div><div class="informaltable"><table border="1"><colgroup><col><col></colgroup><tbody><tr><td>Type</td><td>String</td></tr><tr><td>Default Value</td><td><tt class="literal">dvi</tt> for windows/*nix and
         <tt class="literal">pdf</tt> for mac</td></tr></tbody></table></div><p>
     Use this setting to choose the default target format. For example,
     setting this to <tt class="literal">pdf</tt> makes Latex-Suite compile a pdf file
     when you press <tt class="literal">\ll</tt> and fire up the
     <tt class="literal">pdf</tt> viewer on pressing <tt class="literal">\lv</tt>. Make
     sure that a rules for compiling and viewing have been defined for this
     target format as described <a href="#Tex_CompileRule_format" title="11.6.2 g:Tex_CompileRule_&lt;format&gt;">here</a> and <a href="#Tex_ViewRule_format" title="11.7.1 g:Tex_ViewRule_&lt;format&gt;">here</a>.
    </p></div><div class="section" lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="Tex_CompileRule_format"></a>11.6.2 g:Tex_CompileRule_&lt;format&gt;</h4></div></div><div></div></div><p>
     Here <tt class="literal">&lt;format&gt;</tt> refers to the target format for
     which this rule is defined. Latex-Suite supports compiling into
     <tt class="literal">dvi</tt>, <tt class="literal">ps</tt> and <tt class="literal">pdf</tt>
     by default. All these rules are strings defined by default as follows:
    </p><div class="informaltable"><table border="1"><colgroup><col><col></colgroup><tbody><tr><td><tt class="literal">g:Tex_CompileRule_dvi</tt></td><td><tt class="literal">'latex -interaction=nonstopmode $*'</tt></td></tr><tr><td><tt class="literal">g:Tex_CompileRule_ps</tt></td><td><tt class="literal">'ps2pdf $*'</tt></td></tr><tr><td><tt class="literal">g:Tex_CompileRule_pdf</tt></td><td><tt class="literal">'pdflatex -interaction=nonstopmode $*'</tt></td></tr></tbody></table></div><p>
     If you desire forward and inverse searching via Latex-Suite, you will need to
     change <tt class="literal">g:Tex_CompileRule_dvi</tt> to include
     <tt class="literal">-src-specials</tt>. However, this has been known to cause
     problems with the output file. Therefore, use this with care.
    </p></div><div class="section" lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="d0e4654"></a>11.6.3 g:Tex_FormatDependency_&lt;format&gt;</h4></div></div><div></div></div><p>
     </p><div class="informaltable"><table border="1"><colgroup><col><col></colgroup><tbody><tr><td>Type</td><td>string</td></tr><tr><td>Default Value</td><td><tt class="literal">''</tt></td></tr></tbody></table></div><p>
     By default, there are no format dependencies defined. Each definition
     is of the form above where <tt class="literal">&lt;format&gt;</tt> is a
     string such as <tt class="literal">'dvi'</tt> etc.
    </p><p>
     The value of each string is a comma seperated string such as 'dvi,ps'.
     See the <a href="#compiler-dependency" title="6.2 Handling dependencies in compilation">Compiler dependency</a>
     section to see how to use/specify this setting
    </p></div><div class="section" lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="Tex_MultipleCompileFormats"></a>11.6.4 g:Tex_MultipleCompileFormats</h4></div></div><div></div></div><p>
     </p><div class="informaltable"><table border="1"><colgroup><col><col></colgroup><tbody><tr><td>Type</td><td>string</td></tr><tr><td>Default Value</td><td><tt class="literal">'dvi'</tt></td></tr></tbody></table></div><p>
    </p><p>
     This is a comma seperated string of formats for which the compiler
     needs to be called multiple times in order to get cross-references,
     citations etc right. See the <a href="#compiling-multiple" title="6.3 Compiling multiple times">Compiling multiple times</a> section
     for details.
    </p></div><div class="section" lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="Tex_IgnoredWarnings"></a>11.6.5 g:Tex_IgnoredWarnings</h4></div></div><div></div></div><div class="informaltable"><table border="1"><colgroup><col><col></colgroup><tbody><tr><td>Type</td><td>String</td></tr><tr><td>Default Value</td><td><tt class="literal">a new-line seperated list of patterns as described
          below</tt></td></tr></tbody></table></div><p>
     The default value of this setting is
     </p><pre class="programlisting">\"Underfull\n".
\"Overfull\n".
\"specifier changed to\n".
\"You have requested\n".
\"Missing number, treated as zero.\n".
\"There were undefined references\n"
\"Citation %.%# undefined"</pre><p>
     This setting defines a set of patterns which will be filtered out when
     displaying the output from the latex compiler. This is to aid in
     filtering out very common warnings/errors.
    </p><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>
      Remember to check the value of <a href="#Tex_IgnoreLevel" title="11.6.6 g:Tex_IgnoreLevel"><tt class="literal">g:Tex_IgnoreLevel</tt></a>
      when you change this setting. For example, if you append a new pattern
      which you would like to ignore by default, increase the value of
      <tt class="literal">g:Tex_IgnoreLevel</tt>.
     </p></div></div><div class="section" lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="Tex_IgnoreLevel"></a>11.6.6 g:Tex_IgnoreLevel</h4></div></div><div></div></div><div class="informaltable"><table border="1"><colgroup><col><col></colgroup><tbody><tr><td>Type</td><td>Integer</td></tr><tr><td>Default Value</td><td><tt class="literal">7</tt></td></tr></tbody></table></div><p>
     This setting defines a "filter level" or an "ignore level". A value of 7
     for instance means that any warning/error matching with any of the first
     7 fields of <a href="#Tex_IgnoredWarnings" title="11.6.5 g:Tex_IgnoredWarnings"><tt class="literal">g:Tex_IgnoredWarnings</tt></a>
     will be ignored. Setting this value to zero will mean that no
     error/warning is ignored. However, even with a value of zero, Latex-Suite will
     filter out most of the text which a LaTeX compiler typically produces.
     Use
     </p><pre class="programlisting">TCLevel strict</pre><p>
     from within Vim in order to see all the lines from the compiler's
     output.
    </p></div><div class="section" lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="Tex_UseMakefile"></a>11.6.7 Tex_UseMakefile</h4></div></div><div></div></div><p>
     </p><div class="informaltable"><table border="1"><colgroup><col><col></colgroup><tbody><tr><td>Type</td><td>boolean</td></tr><tr><td>Default Value</td><td><tt class="literal">1</tt></td></tr></tbody></table></div><p>
     </p><p>
      When set to 1, then if a <tt class="literal">makefile</tt> or
      <tt class="literal">Makefile</tt> is present in the current directory, then
      Latex-Suite sets the <tt class="literal">makeprg</tt> option to just
      <tt class="literal">"make &lt;target&gt;"</tt>, where
      <tt class="literal">&lt;target&gt;</tt> is the target format chosen using
      the <tt class="literal">TCTarget</tt> or <tt class="literal">TTarget</tt>
      commands.
     </p><p>
     </p><p>
      When set to 0, then Latex-Suite will set the <tt class="literal">makeprg</tt>
      setting to whatever is defined by the <a href="#Tex_CompileRule_format" title="11.6.2 g:Tex_CompileRule_&lt;format&gt;">g:Tex_CompileRule_target</a>
      setting.
     </p><p>
    </p></div><div class="section" lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="Tex_GotoError"></a>11.6.8 g:Tex_GotoError</h4></div></div><div></div></div><div class="informaltable"><table border="1"><colgroup><col><col></colgroup><tbody><tr><td>Type</td><td>boolean</td></tr><tr><td>Default Value</td><td><tt class="literal">1</tt></td></tr></tbody></table></div><p>
     If set to 1, then pressing <tt class="literal">\ll</tt> will take you to
     the location of the first warning/error, otherwise you will remain in
     the original location but the errors/warnings will be listed in the
     preview window.
    </p></div></div><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="customizing-viewing"></a>11.7 Viewer Customization</h3></div></div><div></div></div><p>
    The following settings affect how Latex-Suite will display compiled files.
   </p><div class="section" lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="Tex_ViewRule_format"></a>11.7.1 g:Tex_ViewRule_&lt;format&gt;</h4></div></div><div></div></div><p>
     Here <tt class="literal">&lt;format&gt;</tt> refers to a format such as
     <tt class="literal">dvi</tt>, <tt class="literal">ps</tt>, etc. This variable defines
     the program which will be called to display a file of that format.
    </p><p>
     By default, Latex-Suite defines viewer programs for viewing DVI, PS and PDF
     formats as follows:
    </p><div class="informaltable"><table border="1"><colgroup><col><col><col></colgroup><thead><tr><th>&nbsp;</th><th>Windows</th><th>Unix</th></tr></thead><tbody><tr><td><tt class="literal">g:Tex_ViewRule_dvi</tt></td><td><tt class="literal">'yap -1'</tt></td><td><tt class="literal">'xdvi'</tt></td></tr><tr><td><tt class="literal">g:Tex_ViewRule_ps</tt></td><td><tt class="literal">'gsview32'</tt></td><td><tt class="literal">'ghostview'</tt></td></tr><tr><td><tt class="literal">g:Tex_ViewRule_pdf</tt></td><td><tt class="literal">'AcroRd32'</tt></td><td><tt class="literal">'xpdf'</tt></td></tr></tbody></table></div><p>
     For Macintosh systems, these strings are left empty by default. This lets
     the system pick the program for each format. If you define these variables
     for Mac, the system choice will be over-ridden.
    </p><p>
     Latex-Suite appends <tt class="literal">file.format</tt> to the above settings
     while calling the external programs. For example, with
     </p><pre class="programlisting">let g:Tex_ViewRule_dvi = 'yap -1'</pre><p>
     <tt class="literal">yap</tt> is called as 
     </p><pre class="programlisting">!start yap -1 file.dvi</pre><p> from within
     Vim. (The initial <tt class="literal">start</tt> is used on
     <tt class="literal">Windows</tt> platforms is to make <tt class="literal">yap</tt>
     start as a seperate process.) If you find the way Latex-Suite constructs the
     command line too restrictive, you can use the <a href="#Tex_ViewRuleComplete_format" title="11.7.2 Tex_ViewRuleComplete_&lt;format&gt;"><tt class="literal">Tex_ViewRuleComplete_format</tt></a>
     setting for more complete control on how the command line is
     constructed while calling the external program for viewing.
    </p><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>
      For windows, you will need to set the <tt class="literal">$PATH</tt> variable
      to include the paths to <tt class="literal">yap</tt>,
      <tt class="literal">AcroRd32</tt>, <tt class="literal">gsview32</tt> and any other
      programs. See your system documentation for how to do this.
     </p></div><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Default Viewing Format</h3><p>
      To change the default format for viewing files, set the <a href="#Tex_DefaultTargetFormat" title="11.6.1 g:Tex_DefaultTargetFormat">g:Tex_DefaultTargetFormat</a>
      variable.
     </p></div></div><div class="section" lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="Tex_ViewRuleComplete_format"></a>11.7.2 Tex_ViewRuleComplete_&lt;format&gt;</h4></div></div><div></div></div><p>
     Here <tt class="literal">&lt;format&gt;</tt> refers to the extension of a
     output format such as <tt class="literal">dvi</tt>, <tt class="literal">html</tt>
     etc.
    </p><p>
     <tt class="literal">Tex_ViewRuleComplete_format</tt> takes precedence over
     <tt class="literal">Tex_ViewRule_format</tt> if both are specified. By
     default, Latex-Suite does not define values for
     <tt class="literal">Tex_ViewRuleComplete_format</tt> for any
     <tt class="literal">format</tt>. Unlike in the case of
     <tt class="literal">Tex_ViewRule_format</tt>, Latex-Suite does not modify
     <tt class="literal">Tex_ViewRuleComplete_format</tt> at all in constructing
     the command line. The only modification is to substitute
     <tt class="literal">'$*'</tt> everywhere in the string with the name of the
     file being viewed (without the extension).
    </p><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">IMPORTANT</h3><p>
      Make sure you make the process go into the background otherwise vim
      will wait for the viewer to terminate before letting you edit the file
      again.
     </p><p>
      To make a process go into the background on a <tt class="literal">*nix</tt>
      platform, use a trailing <tt class="literal">&amp;</tt> in the setting. On
      <tt class="literal">Windows</tt>, use <tt class="literal">start</tt> at the
      beginning of the setting. Example: Suppose you have a latex-&gt;html
      converter which converts a file say foo.tex to a file foo/index.html.
      Then you would use:
      </p><pre class="programlisting">" On *nix platform
let g:Tex_ViewRuleComplete_html = 'MozillaFirebird $*/index.html &amp;'
" On windows platform
let g:Tex_ViewRuleComplete_html = 'start MozillaFirebird $*/index.html'</pre><p>
     </p></div></div></div><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="customizing-menus"></a>11.8 Menu Customization</h3></div></div><div></div></div><p>
    In addition to using the variables defined in this section to affect
    the menu-layout permanently (i.e, the layout Latex-Suite will start with), you
    can also use the <tt class="literal">TeX-Suite &gt; Configure Menu</tt> menu to
    dynamically configure the menu layout after Latex-Suite has started.
   </p><div class="section" lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="Tex_Menus"></a>11.8.1 g:Tex_Menus</h4></div></div><div></div></div><div class="informaltable"><table border="1"><colgroup><col><col></colgroup><tbody><tr><td>Type</td><td>Boolean</td></tr><tr><td>Default Value</td><td><tt class="literal">1</tt></td></tr></tbody></table></div><p>
     If set to 0, Latex-Suite will suppress showing all menus. Useful if you mostly
     work in terminals.
    </p></div><div class="section" lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="Tex_MainMenuLocation"></a>11.8.2 <tt class="literal">g:Tex_MainMenuLocation</tt></h4></div></div><div></div></div><div class="informaltable"><table border="1"><colgroup><col><col></colgroup><tbody><tr><td>Type</td><td>number</td></tr><tr><td>Default Value</td><td><tt class="literal">80</tt></td></tr></tbody></table></div><p>
     This setting decides the location of the first top-level Latex-Suite
     menu. You can for example shift all the menus created by Latex-Suite
     to the very end by setting this value to a large number like 990.
    </p></div><div class="section" lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="Tex_MathMenus"></a>11.8.3 g:Tex_MathMenus</h4></div></div><div></div></div><div class="informaltable"><table border="1"><colgroup><col><col></colgroup><tbody><tr><td>Type</td><td>Boolean</td></tr><tr><td>Default Value</td><td><tt class="literal">1</tt></td></tr></tbody></table></div><p>
     The <tt class="literal">Tex-Math</tt> menu consists of hundreds of mathematical
     symbols used in LaTeX. This menu comprises about 75% of the menus.
    </p></div><div class="section" lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="Tex_NestElementMenus"></a>11.8.4 g:Tex_NestElementMenus</h4></div></div><div></div></div><div class="informaltable"><table border="1"><colgroup><col><col></colgroup><tbody><tr><td>Type</td><td>Boolean</td></tr><tr><td>Default Value</td><td><tt class="literal">1</tt></td></tr></tbody></table></div><p>
     This setting controls the "compactness" of the menus. If set to 1, then the
     Font, Counter and Dimensioning menus are collected together in a single
     menu called <tt class="literal">Tex-Elements</tt>, otherwise, they will each get
     a seperate menu.
    </p></div><div class="section" lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="Tex_PackagesMenu"></a>11.8.5 g:Tex_PackagesMenu</h4></div></div><div></div></div><div class="informaltable"><table border="1"><colgroup><col><col></colgroup><tbody><tr><td>Type</td><td>Boolean</td></tr><tr><td>Default Value</td><td><tt class="literal">1</tt></td></tr></tbody></table></div><p>
     Setting this to zero will stop Latex-Suite from automatically creating the
     <tt class="literal">TeX-Suite &gt; Packages &gt; Supported</tt> menu at startup. You
     can still create the menu after startup by going to
     <tt class="literal">TeX-Suite &gt; Configure Menu</tt>.
    </p></div><div class="section" lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="Tex_NestPackagesMenu"></a>11.8.6 g:Tex_NestPackagesMenu</h4></div></div><div></div></div><div class="informaltable"><table border="1"><colgroup><col><col></colgroup><tbody><tr><td>Type</td><td>String</td></tr><tr><td>Default Value</td><td><tt class="literal">'TeX-'</tt></td></tr></tbody></table></div><p>
     This string is the prefix added to all the menus created by Latex-Suite. If you
     define this variable with a dot (<tt class="literal">'.'</tt>) as the last
     character, then all the menus created by Latex-Suite will be nested under a
     single master menu. For example, set this to
     <tt class="literal">'&amp;LaTeX-Suite.'</tt> to nest all menus under a menu
     called <tt class="literal">&amp;LaTeX-Suite</tt>.
    </p></div><div class="section" lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="Tex_UseUtfMenus"></a>11.8.7 g:Tex_UseUtfMenus</h4></div></div><div></div></div><div class="informaltable"><table border="1"><colgroup><col><col></colgroup><tbody><tr><td>Type</td><td>Boolean</td></tr><tr><td>Default Value</td><td><tt class="literal">0</tt></td></tr></tbody></table></div><p>
     This setting controls whether Latex-Suite uses utf-8 symbols to display some of
     the mathematical symbols in the <tt class="literal">TeX-Math</tt> menu. It is
     necessary for your system/GUI to support utf-8. Setting this to 1 has the
     side-effect of setting the <tt class="literal">'encoding'</tt> option of Vim
     to 'utf-8'.
    </p></div></div><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="customizing-folding"></a>11.9 Folding Customization</h3></div></div><div></div></div><p>
    The following settings control the <a href="#latex-folding" title="8 Latex Folding">folding</a> functionality of Latex-Suite.
   </p><div class="section" lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="Tex_Folding"></a>11.9.1 g:Tex_Folding</h4></div></div><div></div></div><div class="informaltable"><table border="1"><colgroup><col><col></colgroup><tbody><tr><td>Type</td><td>Boolean</td></tr><tr><td>Default Value</td><td><tt class="literal">1</tt></td></tr></tbody></table></div><p>
     Setting this to zero completely disables Latex-Suite's folding functionality.
     However, the <tt class="literal">TexFoldTextFunction()</tt> is still available
     in case you want to use another folding scheme but still want to continue
     using the fold text function.
    </p></div><div class="section" lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="Tex_AutoFolding"></a>11.9.2 g:Tex_AutoFolding</h4></div></div><div></div></div><div class="informaltable"><table border="1"><colgroup><col><col></colgroup><tbody><tr><td>Type</td><td>Boolean</td></tr><tr><td>Default Value</td><td><tt class="literal">1</tt></td></tr></tbody></table></div><p>
     This setting controls whether Latex-Suite automatically creates manual folds for
     a file when it is opened. You can still use the <tt class="literal">\rf</tt>
     mapping to refresh/create folds even when this variable is set to zero.
    </p></div></div><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="customizing-packages"></a>11.10 Package Handling Customization</h3></div></div><div></div></div><p> 
    These settings affect the <a href="#custom-packages" title="4.3.1 Custom Packages">custom
     packages</a> functionality in Latex-Suite
   </p><div class="section" lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="Tex_TEXINPUTS"></a>11.10.1 g:Tex_TEXINPUTS</h4></div></div><div></div></div><div class="informaltable"><table border="1"><colgroup><col><col></colgroup><tbody><tr><td>Type</td><td>string</td></tr><tr><td>Default Value</td><td><tt class="literal">''</tt></td></tr></tbody></table></div><p>
     This setting describes the directories scanned by Latex-Suite while searching
     for custom user packages as desribed in the <a href="#custom-packages" title="4.3.1 Custom Packages">custom packages</a> section. Do not
     include the present directory in this setting. The present directory
     is always scanned for custom packages.
    </p><p>
     This string should be set in the syntax accepted by Vim's native
     <tt class="literal">'path'</tt> setting.
    </p></div></div></div><div class="section" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both;"><a id="latex-suite-credits"></a>12 Credits</h2></div></div><div></div></div><p>
   And finally, the credits:
  </p><div class="informaltable"><table border="0"><colgroup><col><col></colgroup><tbody><tr><td>Artur R. Czechowski</td><td>maintains the BSD package of Latex-Suite. Lots of valuable
       feedback.</td></tr><tr><td>
       Lubomir Host      
      </td><td>
       provided the diacritics and also helped in development.
       
      </td></tr><tr><td>
       Alexander Wagner  
      </td><td>
       valuable suggestions during development.
       
      </td></tr><tr><td>
       Luc Hermitte      
      </td><td>
       his variation of Stephen Riehm's bracketing system is used
       in Latex-Suite.
       
      </td></tr><tr><td>
       Gergely Kontra    
      </td><td>
       the clever little JumpFunc() in imaps.vim is due to him.
       The implementation of the templates also borrows from
       mu-template.vim by him.
       
      </td></tr><tr><td>
       Dimitri Antoniou  
      </td><td>
       author of ltags and also provided the nice tip about
       forward / reverse search on DVI documents.
       
      </td></tr><tr><td>
       Stephen Riehm     
      </td><td>
       the extremely helpful bracketing system is from him.
       
      </td></tr><tr><td>
       Alan Schmitt      
      </td><td>
       provided macros/folding elements. Continued feedback,
       bug-reports/fixes.
       
      </td></tr><tr><td>
       Hari Krishna Dara 
      </td><td>
       for ExecMap(), the clever little function which makes
       typing visual mode mappings so much easier and error-free.
       
      </td></tr><tr><td>
       Alan G Isac       
      </td><td>
       for the comprehensive BibT() function for entering bibtex
       entries.
       
      </td></tr><tr><td>
       Gontran Baerts    
      </td><td>
       for libList.vim
       
      </td></tr><tr><td>
       Peter Heslin      
      </td><td>
       useful discussion and also a lot of bug fixes.
       the %%fakesection in folding.vim.
       
      </td></tr><tr><td>
       Zhang Lin-bo
      </td><td>
       lots of very useful additions to folding. The code for customizing
       the folding scheme is due to him.
      </td></tr></tbody></table></div><p>
   A large number of functions in Latex-Suite come from various other people.
   Some of those people might have been missed here. Each function should however
   have the author's name/e-mail above it. Thats the more authoritative place to
   check out who has done what.
  </p><a id="latex-suite-maintainer"></a><p>
   The current maintainer(s) of Latex-Suite is(are)
  </p><table class="simplelist" summary="Simple list" border="0"><tbody><tr><td>Srinath Avadhanula &lt;srinath@fastmail.fm&gt;</td></tr><tr><td>Mikolaj Machowski &lt;mikmach@wp.pl&gt;</td></tr><tr><td>Benji Fisher &lt;benji@member.AMS.org&gt;</td></tr></tbody></table></div></div></body></html>